projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3237f5c
)
libbb: spawn should remove child which failed to exec
author
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 3 Feb 2011 13:14:09 +0000
(14:14 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 3 Feb 2011 13:14:09 +0000
(14:14 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/vfork_daemon_rexec.c
patch
|
blob
|
history
diff --git
a/libbb/vfork_daemon_rexec.c
b/libbb/vfork_daemon_rexec.c
index af938bed3b732bea371640894ac3342505197849..a75eafbd3e96def9552a4b5386637d6081cfce57 100644
(file)
--- a/
libbb/vfork_daemon_rexec.c
+++ b/
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;
}