diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-07-15 23:27:49 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-07-15 23:27:49 +0000 |
commit | 7715d6b5da9aaadc191f2cffc225a5a82580c013 (patch) | |
tree | 366e567e3d48fec89ebe2ad8b9c02c63553e3c77 /usr.sbin/ypbind | |
parent | 5322c9c163907cbc48e6900714978697db297fb7 (diff) | |
download | FreeBSD-src-7715d6b5da9aaadc191f2cffc225a5a82580c013.zip FreeBSD-src-7715d6b5da9aaadc191f2cffc225a5a82580c013.tar.gz |
Some small signal handling tweaks: be sure to keep wait3()ing until all
children are reaped and make sure to block SIGCHLD delivery during handler
execution when installing SIGCHLD handler with sigaction().
Diffstat (limited to 'usr.sbin/ypbind')
-rw-r--r-- | usr.sbin/ypbind/ypbind.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index 49f8587..0d68818 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -28,7 +28,7 @@ */ #ifndef LINT -static char rcsid[] = "$Id: ypbind.c,v 1.14 1995/05/29 16:39:52 wpaul Exp $"; +static char rcsid[] = "$Id: ypbind.c,v 1.15 1995/05/30 03:55:13 rgrimes Exp $"; #endif #include <sys/param.h> @@ -316,7 +316,8 @@ int sig; { int st; - wait3(&st, WNOHANG, NULL); + while(wait3(&st, WNOHANG, NULL) > 0) + children--; } void terminate(sig) @@ -462,7 +463,6 @@ char **argv; for(ypdb=ypbindlist; ypdb; ypdb=ypdb->dom_pnext) { if (READFD > 0 && FD_ISSET(READFD, &fdsr)) { handle_children(ypdb); - children--; if (children == (MAX_CHILDREN - 1)) checkwork(); } |