From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 04:26:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A0211065676; Mon, 5 Jan 2009 04:26:25 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 272A88FC24; Mon, 5 Jan 2009 04:26:25 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n054QPkr084705; Mon, 5 Jan 2009 04:26:25 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n054QPaQ084704; Mon, 5 Jan 2009 04:26:25 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200901050426.n054QPaQ084704@svn.freebsd.org> From: Rong-En Fan Date: Mon, 5 Jan 2009 04:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186756 - stable/7/usr.sbin/rpc.yppasswdd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 04:26:25 -0000 Author: rafan Date: Mon Jan 5 04:26:24 2009 New Revision: 186756 URL: http://svn.freebsd.org/changeset/base/186756 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 Submitted by: Jui-Nan Lin" Reviewed by: delphij Modified: stable/7/usr.sbin/rpc.yppasswdd/ (props changed) stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Modified: stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c ============================================================================== --- stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 03:50:04 2009 (r186755) +++ stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 04:26:24 2009 (r186756) @@ -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);