wait(2) for compress_log() processes to complete before exit.

Spotted by:	Grigoriy Strokin <grg@isabase.philol.msu.ru>
Reviewed by:	-current
MFC after:	1 month
This commit is contained in:
Maxim Konovalov 2002-05-03 20:53:37 +00:00
parent a1269e01b8
commit 021e53b8df

View File

@ -38,6 +38,7 @@ static const char rcsid[] =
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <paths.h>
@ -136,6 +137,8 @@ main(int argc, char **argv)
free((char *) q);
q = p;
}
while (wait(NULL) > 0 || errno == EINTR)
;
return (0);
}