Loading init/builtins.c +8 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include <stdlib.h> #include <sys/mount.h> #include <sys/resource.h> #include <sys/wait.h> #include <linux/loop.h> #include "init.h" Loading Loading @@ -186,11 +187,16 @@ int do_exec(int nargs, char **args) pid = fork(); if (!pid) { execv(par[0],par); execvp(par[0],par); exit(0); } else { while(wait(&status)!=pid); waitpid(pid, &status, 0); if (WEXITSTATUS(status) != 0) { ERROR("exec: pid %1d exited with return code %d: %s", (int)pid, WEXITSTATUS(status), strerror(status)); } } return 0; } Loading Loading
init/builtins.c +8 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include <stdlib.h> #include <sys/mount.h> #include <sys/resource.h> #include <sys/wait.h> #include <linux/loop.h> #include "init.h" Loading Loading @@ -186,11 +187,16 @@ int do_exec(int nargs, char **args) pid = fork(); if (!pid) { execv(par[0],par); execvp(par[0],par); exit(0); } else { while(wait(&status)!=pid); waitpid(pid, &status, 0); if (WEXITSTATUS(status) != 0) { ERROR("exec: pid %1d exited with return code %d: %s", (int)pid, WEXITSTATUS(status), strerror(status)); } } return 0; } Loading