diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2017-08-23 16:47:04 +0200 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-10-01 08:36:07 +0100 |
commit | ab450021a99ba66126cc6d668fb06ec3829a572b (patch) | |
tree | 73ce5e5c4d3054e7e59772ff4aa3bcd9d5c8db5d /libbb | |
parent | 2ac01855ce6667e9e3d23c76616eb38a73200883 (diff) | |
download | busybox-w32-ab450021a99ba66126cc6d668fb06ec3829a572b.tar.gz busybox-w32-ab450021a99ba66126cc6d668fb06ec3829a572b.tar.bz2 busybox-w32-ab450021a99ba66126cc6d668fb06ec3829a572b.zip |
mingw: special-case xargs -P on Windows
The patches to let xargs support parallel operations on Linux/Unix was
contributed and accepted in upstream BusyBox.
To benefit from this on Windows, we have to work quite a bit harder, was
it is pretty hard to emulate the waitpid() semantics on Windows when pid
is -1, i.e. when waiting for any child to exit.
The problem is not so much accumulating the process handles of children
we spawned (we could do that in our own spawn() implementation), but the
fact that waitpid() returns exactly one pid even when multiple children
have exited, retaining the rest of them for subsequent waitpid() calls.
And on Linux/Unix, those pids are reserved even if the processes have
exited, at least for a while, but not on Windows.
And then there is the problem that BusyBox may have spawned *other*
processes, too, not just the ones we care about in xargs -P.
A much more elegant way is to add Windows-specific code to xargs.c that
specifically handles the child processes spawned by xargs. So let's do
this.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Ron Yorston <rmy@pobox.com>
Diffstat (limited to 'libbb')
0 files changed, 0 insertions, 0 deletions