summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv/yp_main.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-02-10 16:16:14 +0000
committerwpaul <wpaul@FreeBSD.org>1999-02-10 16:16:14 +0000
commitfdde373153fe0ee29cd1819aa4d38e1b20bb3565 (patch)
treefa910f03011a54963bd70e48fc4f3a86a11038ff /usr.sbin/ypserv/yp_main.c
parent8d9b8047a3f4381cb28d8751cef0c3d36b4db86c (diff)
downloadFreeBSD-src-fdde373153fe0ee29cd1819aa4d38e1b20bb3565.zip
FreeBSD-src-fdde373153fe0ee29cd1819aa4d38e1b20bb3565.tar.gz
Add some tweaks to hopefully fix a problem I've started to notice recently.
Under certain conditions (possibly associated with heavy load), ypserv will fork() child processes that don't exit like they're supposed to. I think this is because of some suspect logic in the ypproc_all procedure. I updated it to use what I hope is a more bulletproof approach. Also tweaked yp_svc_run() a little so that the 'are we a child?' test happens at every pass through the for(;;) loop, not just immediately after returning from svc_getreqset2().
Diffstat (limited to 'usr.sbin/ypserv/yp_main.c')
-rw-r--r--usr.sbin/ypserv/yp_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c
index 59974ad..f20ccb3 100644
--- a/usr.sbin/ypserv/yp_main.c
+++ b/usr.sbin/ypserv/yp_main.c
@@ -32,7 +32,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: yp_main.c,v 1.17 1998/02/11 19:15:32 wpaul Exp $";
+ "$Id: yp_main.c,v 1.18 1998/06/04 15:11:14 wpaul Exp $";
#endif /* not lint */
/*
@@ -143,9 +143,9 @@ yp_svc_run()
FD_CLR(resfd, &readfds);
}
svc_getreqset(&readfds);
- if (forked && pid != getpid())
- exit(0);
}
+ if (forked && pid != getpid())
+ _exit(0);
}
}
OpenPOWER on IntegriCloud