updates.
[silc.git] / apps / silcd / silcd.c
index 8fc7736923787edba9f830cf9876e5e25dabe004..12763c0f00eb31f0fca75541033546ec3de3c4de 100644 (file)
@@ -101,6 +101,7 @@ int main(int argc, char **argv)
   int opt, option_index;
   char *config_file = NULL;
   SilcServer silcd;
+  struct sigaction sa;
 
   silc_debug = FALSE;
 
@@ -186,6 +187,12 @@ int main(int argc, char **argv)
   if (ret == FALSE)
     goto fail;
 
+  /* Ignore SIGPIPE */
+  sa.sa_handler = SIG_IGN;
+  sa.sa_flags = 0;
+  sigemptyset(&sa.sa_mask);
+  sigaction(SIGPIPE, &sa, NULL);
+
   if (silc_debug == FALSE)
     /* Before running the server, fork to background and set
        both user and group no non-root */