Uses wait4() instead of wait3() when waiting for a child process to exit.
Reviewed by: yar
This commit is contained in:
parent
e8b6bb6f87
commit
77879b47b7
@ -128,7 +128,7 @@ main(int argc, char **argv)
|
||||
/* parent */
|
||||
(void)signal(SIGINT, SIG_IGN);
|
||||
(void)signal(SIGQUIT, SIG_IGN);
|
||||
while (wait3(&status, 0, &ru) != pid); /* XXX use waitpid */
|
||||
while (wait4(pid, &status, 0, &ru) != pid);
|
||||
gettimeofday(&after, (struct timezone *)NULL);
|
||||
if ( ! WIFEXITED(status))
|
||||
warnx("command terminated abnormally");
|
||||
|
Loading…
Reference in New Issue
Block a user