diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-03 14:14:09 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-03 14:14:09 +0100 |
commit | c5d0f15dbd8087f60b377fa9fc18d08698429189 (patch) | |
tree | c35004eac3c2754328237dc66d669f7200712d27 /libbb/vfork_daemon_rexec.c | |
parent | 3237f5c307c066a008909f35115e21c9473504ab (diff) | |
download | busybox-w32-c5d0f15dbd8087f60b377fa9fc18d08698429189.tar.gz busybox-w32-c5d0f15dbd8087f60b377fa9fc18d08698429189.tar.bz2 busybox-w32-c5d0f15dbd8087f60b377fa9fc18d08698429189.zip |
libbb: spawn should remove child which failed to exec
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/vfork_daemon_rexec.c')
-rw-r--r-- | libbb/vfork_daemon_rexec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index af938bed3..a75eafbd3 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c | |||
@@ -52,6 +52,7 @@ pid_t FAST_FUNC spawn(char **argv) | |||
52 | * Interested party can wait on pid and learn exit code. | 52 | * Interested party can wait on pid and learn exit code. |
53 | * If 111 - then it (most probably) failed to exec */ | 53 | * If 111 - then it (most probably) failed to exec */ |
54 | if (failed) { | 54 | if (failed) { |
55 | safe_waitpid(pid, NULL, 0); /* prevent zombie */ | ||
55 | errno = failed; | 56 | errno = failed; |
56 | return -1; | 57 | return -1; |
57 | } | 58 | } |