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.
This commit is contained in:
parent
17279d6cb5
commit
df76d2a332
@ -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>
|
||||
|
||||
@ -788,6 +789,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.
|
||||
*/
|
||||
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user