From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <johannes.sixt@telecom.at>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH 2/6] Automatically close stderr pipes created by run_command
Date: Fri, 15 Feb 2008 14:14:40 -0800 [thread overview]
Message-ID: <7v1w7dhnov.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <200802152045.37755.johannes.sixt@telecom.at> (Johannes Sixt's message of "Fri, 15 Feb 2008 20:45:37 +0100")
Johannes Sixt <johannes.sixt@telecom.at> writes:
> ... But practically in the case
> where a fd > 0 is assigned to .in/.out/.err:
>
> - case .out, .err: the caller is required to close the fd early after
> start_command() because (if this is a pipe) the child won't see EOF;
>
> - case .in: the caller must not read from the fd anyway, else the child gets
> inconsistent input.
>
> So, while there *is* some inconsistency, the inconsistent cases can be clearly
> separated into the cases fd > 0 and fd == -1.
Ok, sold.
next prev parent reply other threads:[~2008-02-15 22:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 6:22 [PATCH 2/6] Automatically close stderr pipes created by run_command Shawn O. Pearce
2008-02-14 8:00 ` Johannes Sixt
2008-02-15 17:11 ` Junio C Hamano
2008-02-15 19:45 ` Johannes Sixt
2008-02-15 22:14 ` Junio C Hamano [this message]
2008-02-16 17:36 ` [PATCH] start_command(), .in/.out/.err = -1: Callers must close the file descriptor Johannes Sixt
2008-02-16 17:36 ` [PATCH] start_command(), if .in/.out > 0, closes file descriptors, not the callers Johannes Sixt
2008-02-16 22:55 ` Junio C Hamano
2008-02-17 7:42 ` Shawn O. Pearce
2008-02-17 8:07 ` Junio C Hamano
2008-02-17 8:20 ` Shawn O. Pearce
2008-02-17 9:29 ` Johannes Sixt
2008-02-21 22:42 ` [PATCH v2] " Johannes Sixt
2008-02-22 1:17 ` Junio C Hamano
2008-02-16 8:25 ` [PATCH 2/6] Automatically close stderr pipes created by run_command Junio C Hamano
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=7v1w7dhnov.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johannes.sixt@telecom.at \
--cc=spearce@spearce.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;
as well as URLs for NNTP newsgroup(s).