From: neilbrown Date: Fri, 3 Dec 2004 03:32:16 +0000 (+0000) Subject: Ignore SIGPIPE in statd X-Git-Tag: nfs-utils-1-0-7-pre1~5 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=43bca307dd6452c460c33323406164cdcdb44cf6 Ignore SIGPIPE in statd --- diff --git a/ChangeLog b/ChangeLog index aa88488..ddfbe94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-12-03 Trond Myklebust + + * utils/statd/statd.c(main): ignore SIGPIPE + 2004-11-22 "J. Bruce Fields" * tools/rpcdebug/rpcdebug.c: support aliases "nfsdebug" and diff --git a/utils/statd/statd.c b/utils/statd/statd.c index f666bcd..3f64115 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -422,6 +422,11 @@ int main (int argc, char **argv) signal(SIGUSR1, sigusr); /* WARNING: the following works on Linux and SysV, but not BSD! */ signal(SIGCHLD, SIG_IGN); + /* + * Ignore SIGPIPE to avoid statd dying when peers close their + * TCP connection while we're trying to reply to them. + */ + signal(SIGPIPE, SIG_IGN); /* initialize out_port */ statd_get_socket(out_port);