Fixed lack of wait if child fails privledge dropping in secure fork.
This commit is contained in:
@@ -148,7 +148,12 @@ pid_t spc_fork(int *a, size_t size)
|
||||
close(filedes[1]); //Close writing
|
||||
read(filedes[0], &success, 1);
|
||||
close(filedes[0]);
|
||||
return(success ? childpid : -1);
|
||||
if (success)
|
||||
{
|
||||
return(childpid);
|
||||
}
|
||||
waitpid(childpid, filedes, 0);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user