Uses wait4() instead of wait3() when waiting for a child process to exit.

Reviewed by:	yar
This commit is contained in:
Sean Chittenden 2003-10-17 07:53:30 +00:00
parent e8b6bb6f87
commit 77879b47b7

View File

@ -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");