]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/statd/statd.c
HA statd updates
[nfs-utils.git] / utils / statd / statd.c
index f666bcd4cba4e1e61247e715d293e06fc281fd88..48362c0104d332c4f4aa7db4f131b07794d48dc6 100644 (file)
@@ -111,7 +111,8 @@ killer (int sig)
 static void
 sigusr (int sig)
 {
-       dprintf (N_DEBUG, "Caught signal %d, re-reading notify list.", sig);
+       dprintf (N_DEBUG, "Caught signal %d, re-notifying (state %d).", sig,
+                                                               MY_STATE);
        re_notify = 1;
 }
 
@@ -422,6 +423,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);