]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/statd/statd.c
Ignore SIGPIPE in statd
[nfs-utils.git] / utils / statd / statd.c
index f666bcd4cba4e1e61247e715d293e06fc281fd88..3f6411586bc055a6990d097ab5e238dc3a9b3b57 100644 (file)
@@ -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);