From: "Ping Yin" <pkufranky@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Johannes Sixt" <j.sixt@viscovery.net>, git@vger.kernel.org
Subject: Re: [PATCH] Fix start_command closing cmd->out/in regardless of cmd->close_out/in
Date: Wed, 21 Nov 2007 19:55:22 +0800 [thread overview]
Message-ID: <46dff0320711210355icdbf634l258cf39c1582e8d4@mail.gmail.com> (raw)
In-Reply-To: <7vmyt8gdzv.fsf@gitster.siamese.dyndns.org>
On Nov 21, 2007 5:11 PM, Junio C Hamano <gitster@pobox.com> wrote:
> But I think an API definition that says "These fds are closed
> after the call, so if you are going to use them, you can dup()
> them beforehand" is equally valid, and I suspect that forgetting
> to dup() is easier to detect than forgetting to close() --- you
> will notice the former mistake immediately because your read and
> write say "oops, nobody on the other end" but the latter mistake
> will result in a hung process. And for that reason, I think it
> can be called more "graceful". So ...
>
I don't konw the original API definition and havn't found any API
deinition that clarifies the fds will be closed after start_command.
However, when i see child_process.close_in/close_out, i thought
start_command will not close the fds.
I never said that start_command must not close fd. At least this
behaviour of start_command makes child_process.close_in/close_out no
sense.
>
>
--
Ping Yin
next prev parent reply other threads:[~2007-11-21 11:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-19 20:12 [PATCH] Fix start_command closing cmd->out/in regardless of cmd->close_out/in Ping Yin
2007-11-20 16:17 ` Johannes Sixt
2007-11-21 2:38 ` Ping Yin
2007-11-21 9:11 ` Junio C Hamano
2007-11-21 11:55 ` Ping Yin [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-11-18 17:36 Ping Yin
2007-11-18 18:52 ` Junio C Hamano
2007-11-19 7:39 ` Johannes Sixt
2007-11-19 8:46 ` 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=46dff0320711210355icdbf634l258cf39c1582e8d4@mail.gmail.com \
--to=pkufranky@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
/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).