diff options
author | Denis Vlasenko | 2008-07-01 15:59:42 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-07-01 15:59:42 +0000 |
commit | 82604e973085f91f1b99cacea08963d0d1468084 (patch) | |
tree | 2de05bb2a6943ca6be0cc46f36e5fb07099aef40 /debianutils/start_stop_daemon.c | |
parent | b111917972c1398ef96ef2d388c6c4ba57a8e9f7 (diff) | |
download | busybox-82604e973085f91f1b99cacea08963d0d1468084.zip busybox-82604e973085f91f1b99cacea08963d0d1468084.tar.gz |
revert last two commits. vfork cannot be used in subroutine,
it trashes stack on return
Diffstat (limited to 'debianutils/start_stop_daemon.c')
-rw-r--r-- | debianutils/start_stop_daemon.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index f10572d..459fb77 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c @@ -404,7 +404,9 @@ int start_stop_daemon_main(int argc ATTRIBUTE_UNUSED, char **argv) /* DAEMON_DEVNULL_STDIO is superfluous - * it's always done by bb_daemonize() */ #else - pid_t pid = xvfork(); + pid_t pid = vfork(); + if (pid < 0) /* error */ + bb_perror_msg_and_die("vfork"); if (pid != 0) { /* parent */ /* why _exit? the child may have changed the stack, |