From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Trace into open fd and refactor tracing code.
Date: Thu, 31 Aug 2006 14:31:22 -0700 [thread overview]
Message-ID: <7vsljc8udx.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0608311409470.27779@g5.osdl.org> (Linus Torvalds's message of "Thu, 31 Aug 2006 14:14:26 -0700 (PDT)")
Linus Torvalds <torvalds@osdl.org> 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.
next prev parent reply other threads:[~2006-08-31 21:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 6:42 [PATCH] Trace into open fd and refactor tracing code Christian Couder
2006-08-31 21:14 ` Linus Torvalds
2006-08-31 21:31 ` Junio C Hamano [this message]
2006-08-31 21:49 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vsljc8udx.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox