diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Kbuild | 1 | ||||
-rw-r--r-- | libbb/vfork_daemon_rexec.c | 8 | ||||
-rw-r--r-- | libbb/xvfork.c | 28 |
3 files changed, 6 insertions, 31 deletions
diff --git a/libbb/Kbuild b/libbb/Kbuild index 5ace87c..5cbecd5 100644 --- a/libbb/Kbuild +++ b/libbb/Kbuild @@ -109,7 +109,6 @@ 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 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 */ diff --git a/libbb/xvfork.c b/libbb/xvfork.c deleted file mode 100644 index 3fbd0c1..0000000 --- a/libbb/xvfork.c +++ /dev/null @@ -1,28 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* - * Utility routines. - * - * Copyright (C) 2007 Denys Vlasenko - * - * Licensed under GPL version 2, see file LICENSE in this tarball for details. - */ - -#include "libbb.h" - -pid_t FAST_FUNC xvfork(void) -{ - pid_t pid = vfork(); - if (pid < 0) - bb_perror_msg_and_die("vfork"); - return pid; -} - -#if BB_MMU -pid_t FAST_FUNC xfork(void) -{ - pid_t pid = fork(); - if (pid < 0) - bb_perror_msg_and_die("vfork" + 1); - return pid; -} -#endif |