diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2006-05-27 02:37:37 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2006-05-27 02:37:37 +0000 |
commit | af2f8fd25cbfd6450b7b935fd748d6570589d3fa (patch) | |
tree | cddb904abfbdcf6abf63a426c5d6957c4e685899 /usr.sbin | |
parent | ac7b19c8b23d0d3221f798aac9742e59227ede0a (diff) | |
download | FreeBSD-src-af2f8fd25cbfd6450b7b935fd748d6570589d3fa.zip FreeBSD-src-af2f8fd25cbfd6450b7b935fd748d6570589d3fa.tar.gz |
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 <gslin at csie dot nctu dot edu dot tw>
MFC after: 3 days
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpc.lockd/kern.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |