diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-02-07 05:04:53 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-02-07 05:04:53 +0000 |
commit | 0a7e37f6d4abef64b4fec18a33135850df4a37cf (patch) | |
tree | faebfe1190238991c7551a3a31a1e711fb85d890 /gnu/usr.sbin | |
parent | 6a86aa802ff0936739b48891826ba340f59aa0d1 (diff) | |
download | FreeBSD-src-0a7e37f6d4abef64b4fec18a33135850df4a37cf.zip FreeBSD-src-0a7e37f6d4abef64b4fec18a33135850df4a37cf.tar.gz |
Do proper job of reaping child 'ypxfr' processes (we could sometimes
leave a zombie lying around until the next map transfer came alone).
Also fixed some minor typos on the man page.
Diffstat (limited to 'gnu/usr.sbin')
-rw-r--r-- | gnu/usr.sbin/ypserv/server.c | 18 | ||||
-rw-r--r-- | gnu/usr.sbin/ypserv/ypserv.8 | 6 |
2 files changed, 17 insertions, 7 deletions
diff --git a/gnu/usr.sbin/ypserv/server.c b/gnu/usr.sbin/ypserv/server.c index bfa2e1a..8539ae7 100644 --- a/gnu/usr.sbin/ypserv/server.c +++ b/gnu/usr.sbin/ypserv/server.c @@ -24,7 +24,7 @@ ** Ported to FreeBSD and hacked all to pieces ** by Bill Paul <wpaul@ctr.columbia.edu> ** -** $Id: server.c,v 1.1 1995/01/31 08:58:53 wpaul Exp $ +** $Id: server.c,v 1.2 1995/02/04 21:32:02 wpaul Exp $ ** */ @@ -48,6 +48,7 @@ #include <sys/param.h> #include <sys/types.h> #include <sys/wait.h> +#include <signal.h> #include <sys/time.h> #include <sys/resource.h> @@ -789,6 +790,17 @@ static void print_ypmap_parms(const struct ypmap_parms *pp) /* +** Clean up after ypxfr child processes signal their termination. +*/ +void reapchild(sig) +int sig; +{ + int st; + + wait3(&st, WNOHANG, NULL); +} + +/* ** Stole the ypxfr implementation from the yps package. */ ypresp_xfr *ypproc_xfr_2_svc(ypreq_xfr *xfr, @@ -855,9 +867,7 @@ ypresp_xfr *ypproc_xfr_2_svc(ypreq_xfr *xfr, result.xfrstat = YPXFR_XFRERR; default: { - int st; - - wait4(-1, &st, WNOHANG, NULL); + signal(SIGCHLD, reapchild); result.xfrstat = YPXFR_SUCC; break; } diff --git a/gnu/usr.sbin/ypserv/ypserv.8 b/gnu/usr.sbin/ypserv/ypserv.8 index 5b5ac91..209db1f 100644 --- a/gnu/usr.sbin/ypserv/ypserv.8 +++ b/gnu/usr.sbin/ypserv/ypserv.8 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id$ +.\" $Id: ypserv.8,v 1.1 1995/02/04 21:32:04 wpaul Exp $ .\" .Dd February 4, 1995 .Dt YPSERV 8 @@ -64,7 +64,7 @@ Each client in an NIS domain must have its domainname set to one of the domains served by .Nm ypserv using the -.Xr domainname 2 +.Xr domainname 1 command. The clients must also run .Xr ypbind 8 in order to attach to a particular server, since it is possible to @@ -79,7 +79,7 @@ where is the name of the domain being served. There can be several such directories with different domainnames, and .Nm ypserv -cam handle them all. +can handle them all. .Pp The databases, or .Pa maps |