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
This commit is contained in:
Craig Rodrigues 2006-05-27 02:37:37 +00:00
parent 1af6f471ca
commit e91db40c18

View File

@ -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);