From af2f8fd25cbfd6450b7b935fd748d6570589d3fa Mon Sep 17 00:00:00 2001 From: rodrigc Date: Sat, 27 May 2006 02:37:37 +0000 Subject: Move call to ignore SIGPIPE signals before calling fork(), so that both parent and child processes ignore this signal. PR: bin/97768 Submitted by: Gea-Suan Lin MFC after: 3 days --- usr.sbin/rpc.lockd/kern.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/rpc.lockd/kern.c b/usr.sbin/rpc.lockd/kern.c index 978df6b..6073f55 100644 --- a/usr.sbin/rpc.lockd/kern.c +++ b/usr.sbin/rpc.lockd/kern.c @@ -136,6 +136,9 @@ client_request(void) syslog(LOG_ERR, "open: %s: %m", _PATH_NFSLCKDEV); goto err; } + + signal(SIGPIPE, SIG_IGN); + /* * Create a separate process, the client code is really a separate * daemon that shares a lot of code. @@ -151,7 +154,6 @@ client_request(void) signal(SIGHUP, (sig_t)client_cleanup); signal(SIGTERM, (sig_t)client_cleanup); - signal(SIGPIPE, SIG_IGN); /* Setup. */ (void)time(&owner.tod); -- cgit v1.1