summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Kbuild1
-rw-r--r--libbb/vfork_daemon_rexec.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/libbb/Kbuild b/libbb/Kbuild
index 5cbecd5..5ace87c 100644
--- a/libbb/Kbuild
+++ b/libbb/Kbuild
@@ -109,6 +109,7 @@ lib-y += xfunc_die.o
lib-y += xgetcwd.o
lib-y += xgethostbyname.o
lib-y += xreadlink.o
+lib-y += xvfork.o
# conditionally compiled objects:
lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c
index 37d4c27..9baa813 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -226,9 +226,7 @@ void FAST_FUNC forkexit_or_rexec(char **argv)
if (re_execed)
return;
- pid = vfork();
- if (pid < 0) /* wtf? */
- bb_perror_msg_and_die("vfork");
+ pid = xvfork();
if (pid) /* parent */
exit(EXIT_SUCCESS);
/* child - re-exec ourself */