2 * Rexec program for system have fork() as vfork() with foregound option
3 * Copyright (C) Vladminr Oleynik and many different people.
10 #if defined(__uClinux__)
11 void vfork_daemon_rexec(int argc, char **argv, char *foreground_opt)
16 vfork_args = xcalloc(sizeof(char *), argc + 3);
18 vfork_args[a++] = *argv;
21 vfork_args[a] = foreground_opt;
22 execvp("/proc/self/exe", vfork_args);
23 vfork_args[0] = "/bin/busybox";
24 execv(vfork_args[0], vfork_args);
25 bb_perror_msg_and_die("execv %s", vfork_args[0]);