revert last two commits. vfork cannot be used in subroutine,
it trashes stack on return
This commit is contained in:
parent
b111917972
commit
82604e9730
15 changed files with 55 additions and 50 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue