revert last two commits. vfork cannot be used in subroutine,
it trashes stack on return
This commit is contained in:
@@ -890,7 +890,6 @@ get_mountport(struct pmap *pm_mnt,
|
||||
}
|
||||
|
||||
#if BB_MMU
|
||||
/* Unlike bb_daemonize(), parent does NOT exit here, but returns 0 */
|
||||
static int daemonize(void)
|
||||
{
|
||||
int fd;
|
||||
|
@@ -87,7 +87,10 @@ int script_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
|
||||
/* TODO: SIGWINCH? pass window size changes down to slave? */
|
||||
|
||||
child_pid = xvfork();
|
||||
child_pid = vfork();
|
||||
if (child_pid < 0) {
|
||||
bb_perror_msg_and_die("vfork");
|
||||
}
|
||||
|
||||
if (child_pid) {
|
||||
/* parent */
|
||||
|
Reference in New Issue
Block a user