summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.yppasswdd
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2008-10-30 01:54:31 +0000
committerrafan <rafan@FreeBSD.org>2008-10-30 01:54:31 +0000
commit5256ae4dbd8b07789124a677fff88bf45368171e (patch)
treed51862cff0066e88e5019b334ef9b6326c0c0007 /usr.sbin/rpc.yppasswdd
parent5f78e537d9eb5f9b04ad7ff8b30758c3e9aae367 (diff)
downloadFreeBSD-src-5256ae4dbd8b07789124a677fff88bf45368171e.zip
FreeBSD-src-5256ae4dbd8b07789124a677fff88bf45368171e.tar.gz
- 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 MFC after: 1 month
Diffstat (limited to 'usr.sbin/rpc.yppasswdd')
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
index e4170bd..8c89691 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
@@ -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_domain);
}
}
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);
OpenPOWER on IntegriCloud