diff options
Diffstat (limited to 'libbb/vfork_daemon_rexec.c')
-rw-r--r-- | libbb/vfork_daemon_rexec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index 989e9b8..37d4c27 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c @@ -226,7 +226,9 @@ void FAST_FUNC forkexit_or_rexec(char **argv) if (re_execed) return; - pid = xvfork(); + pid = vfork(); + if (pid < 0) /* wtf? */ + bb_perror_msg_and_die("vfork"); if (pid) /* parent */ exit(EXIT_SUCCESS); /* child - re-exec ourself */ @@ -238,7 +240,9 @@ void FAST_FUNC forkexit_or_rexec(char **argv) void FAST_FUNC forkexit_or_rexec(void) { pid_t pid; - pid = xfork(); + pid = fork(); + if (pid < 0) /* wtf? */ + bb_perror_msg_and_die("fork"); if (pid) /* parent */ exit(EXIT_SUCCESS); /* child */ |