Date: Thu, 2 May 2002 00:04:07 +0400 (MSD) From: Maxim Konovalov <maxim@macomnet.ru> To: current@freebsd.org Subject: newsyslog(8) should wait(2) for children Message-ID: <20020501235620.I86238-100000@news1.macomnet.ru>
next in thread | raw e-mail | index | archive | help
Does anyone object to the next patch:
Index: newsyslog.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/newsyslog/newsyslog.c,v
retrieving revision 1.41
diff -u -r1.41 newsyslog.c
--- newsyslog.c 10 Apr 2002 10:38:44 -0000 1.41
+++ newsyslog.c 1 May 2002 19:15:40 -0000
@@ -38,6 +38,7 @@
#include <ctype.h>
#include <err.h>
+#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <paths.h>
@@ -135,6 +136,12 @@
p = p->next;
free((char *) q);
q = p;
+ }
+ for (;;) {
+ if (wait(NULL) < 0) {
+ if (errno != EINTR)
+ break;
+ }
}
return (0);
}
%%%
--
Maxim Konovalov, MAcomnet, Internet Dept., system engineer
phone: +7 (095) 796-9079, mailto:maxim@macomnet.ru
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020501235620.I86238-100000>
