From 43bca307dd6452c460c33323406164cdcdb44cf6 Mon Sep 17 00:00:00 2001 From: neilbrown Date: Fri, 3 Dec 2004 03:32:16 +0000 Subject: [PATCH] Ignore SIGPIPE in statd --- ChangeLog | 4 ++++ utils/statd/statd.c | 5 +++++ 2 files changed, 9 insertions(+) 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); -- 2.39.2