aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-08-23 16:15:48 +0200
committerRon Yorston <rmy@pobox.com>2017-10-01 08:30:32 +0100
commit2ac01855ce6667e9e3d23c76616eb38a73200883 (patch)
treeffcac21d0bd3cb83f272a4c6f4f61769273e1eb2
parent236e13e3da46e10607d32905b96e3f5e3330700e (diff)
downloadbusybox-w32-2ac01855ce6667e9e3d23c76616eb38a73200883.tar.gz
busybox-w32-2ac01855ce6667e9e3d23c76616eb38a73200883.tar.bz2
busybox-w32-2ac01855ce6667e9e3d23c76616eb38a73200883.zip
mingw: clarify that waitpid(-1, ...) is not supported
When passing -1 as pid to the waitpid() function, it is supposed to wait for *any* child to exit. That is a bit tough to emulate on Windows given that waitpid() returns only one pid, and if multiple children have exited, subsequent calls to waitpid() should produce all of their pids subsequently. Oh, and we would have to figure out which processes were spawned and remember that list. And then, it would still be possible for the children to exit in the meantime and for *another* process using the pid, as Windows reuses pids very, very quickly. So let's punt and simply state that we do not support that functionality. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Ron Yorston <rmy@pobox.com>
-rw-r--r--win32/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/process.c b/win32/process.c
index 9ad75f94f..a0e8b96e0 100644
--- a/win32/process.c
+++ b/win32/process.c
@@ -15,7 +15,7 @@ int waitpid(pid_t pid, int *status, int options)
15 return ret == -1 ? -1 : pid; 15 return ret == -1 ? -1 : pid;
16 } 16 }
17 } 17 }
18 errno = EINVAL; 18 errno = pid < 0 ? ENOSYS : EINVAL;
19 return -1; 19 return -1;
20} 20}
21 21