diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 1907f8f5fe55..7e178a9b068a 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -38,6 +38,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -136,6 +137,8 @@ main(int argc, char **argv) free((char *) q); q = p; } + while (wait(NULL) > 0 || errno == EINTR) + ; return (0); }