Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jan 2009 13:06:03 +0000 (UTC)
From:      Rong-En Fan <rafan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
Subject:   svn commit: r186772 - stable/6/usr.sbin/rpc.yppasswdd
Message-ID:  <200901051306.n05D63et096962@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rafan
Date: Mon Jan  5 13:06:03 2009
New Revision: 186772
URL: http://svn.freebsd.org/changeset/base/186772

Log:
  MFC r184459
  
   - Whenever a password/shell is changed via rpc.yppasswdd, the daemon leaves
     one zombie process because it does not do the cleanup. For a long running
     NIS/YP server, it will have lots of zombie processes on it. Fix that by
     ignoring the SIGCHLD signal since we don't really care about the exit
     status in this case.
  
  PR:           bin/91980
  Reported by:  Arjan van der Velde <dj_noresult at hotmail.com>
  Submitted by: Jui-Nan Lin" <jnlin at csie.nctu.edu.tw>
  Reviewed by:  delphij

Modified:
  stable/6/usr.sbin/rpc.yppasswdd/   (props changed)
  stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c

Modified: stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
==============================================================================
--- stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c	Mon Jan  5 12:58:43 2009	(r186771)
+++ stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c	Mon Jan  5 13:06:03 2009	(r186772)
@@ -165,6 +165,7 @@ main(int argc, char *argv[])
 	struct sockaddr_in saddr;
 	socklen_t asize = sizeof (saddr);
 	struct netconfig *nconf;
+	struct sigaction sa;
 	void *localhandle;
 	int ch;
 	char *mastername;
@@ -268,6 +269,9 @@ the %s domain -- aborting", yppasswd_dom
 		}
 	}
 	openlog("rpc.yppasswdd", LOG_PID, LOG_DAEMON);
+	memset(&sa, 0, sizeof(sa));
+	sa.sa_flags = SA_NOCLDWAIT;
+	sigaction(SIGCHLD, &sa, NULL);
 
 	rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL);
 	rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901051306.n05D63et096962>