From: Jonathan Nieder <jrnieder@gmail.com>
To: Stefan Beller <sbeller@google.com>
Cc: peff@peff.net, git@vger.kernel.org,
johannes.schindelin@gmail.com, j6t@kdbg.org, tboegi@web.de
Subject: Re: [PATCHv2] run-command: detect finished children by closed pipe rather than waitpid
Date: Fri, 20 Nov 2015 14:05:44 -0800 [thread overview]
Message-ID: <20151120220544.GC18255@google.com> (raw)
In-Reply-To: <1448053719-28340-1-git-send-email-sbeller@google.com>
Stefan Beller wrote:
> Detect if a child stopped working by checking if their stderr pipe
> was closed instead of checking their state with waitpid.
> As waitpid is not fully working in Windows, this is an approach which
> allows for better cross platform operation. (It's less code, too)
Can you say more about what is broken about waitpid on Windows?
I ask because it's possible for a child to close stderr without
intending to be finished. That might be okay here (though the commit
subject doesn't explain so, it is only affecting the workqueue
interface that runs commands in parallel and not the normal
run-command interface) but would need some documentation and could be
counterintuitive.
So if there's a simple way to get waitpid to work, that seems
preferrable.
Thanks,
Jonathan
next prev parent reply other threads:[~2015-11-20 22:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 21:08 [PATCHv2] run-command: detect finished children by closed pipe rather than waitpid Stefan Beller
2015-11-20 22:05 ` Jonathan Nieder [this message]
2015-11-20 23:24 ` Johannes Sixt
2015-11-21 6:58 ` Torsten Bögershausen
2015-11-23 18:44 ` Stefan Beller
2015-11-23 19:01 ` Stefan Beller
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=20151120220544.GC18255@google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=johannes.schindelin@gmail.com \
--cc=peff@peff.net \
--cc=sbeller@google.com \
--cc=tboegi@web.de \
/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).