Re: [PATCH] Trace into open fd and refactor tracing code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus Torvalds <torvalds@xxxxxxxx> writes:

> That way, if you want to do the fd thing, you can always just do
>
> 	GIT_TRACE=/proc/self/fd/9 make test 9>/var/tmp/trace.log
>
> although I really don't know how well that works across a fork/exec that 
> may or may not be closing the file descriptor (I think it's much simpler 
> and more obvious to just give the filename directly).

Actually it was me who suggested the use of fd directly, along
with trying to do one message in a single write (i.e. not doing
stdio as much as possible).

Process A has fd=9 opened to /var/tmp/trace.log and forks
process B.

(1) process B execs something else, and just writes into fd=9

or

(2) process B execs something else, perhaps after closing fd=9,
    and the exec'ed image opens /var/tmp/trace.log with
    "O_APPEND|O_CREAT" and gets a fd; it writes into this fd.

I somehow felt there would be less interference between writes
issued by process A and process B, but probably I am mistaken.



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]