busybox: add 1.18.2 libbb fix

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Peter Korsgaard 2011-02-04 19:49:50 +01:00
parent 9384f00cce
commit 3fa18d27d3

View File

@ -0,0 +1,10 @@
--- busybox-1.18.2/libbb/vfork_daemon_rexec.c
+++ busybox-1.18.2-libbb/libbb/vfork_daemon_rexec.c
@@ -52,6 +52,7 @@ pid_t FAST_FUNC spawn(char **argv)
* Interested party can wait on pid and learn exit code.
* If 111 - then it (most probably) failed to exec */
if (failed) {
+ safe_waitpid(pid, NULL, 0); /* prevent zombie */
errno = failed;
return -1;
}