updates.
authorPekka Riikonen <priikone@silcnet.org>
Tue, 3 Jul 2001 08:41:42 +0000 (08:41 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 3 Jul 2001 08:41:42 +0000 (08:41 +0000)
CHANGES
apps/silcd/silcd.c

diff --git a/CHANGES b/CHANGES
index 17073f9f2126a72b2fcea4d7c838b51a8445d2c2..feb120c54eeb4f0811023cf66707e9127f82c814 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+Tue Jul  3 11:39:20 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
+
+       * Found the reason of random crashes in the server.  We weren't
+         ignoring the SIGPIPE signal (which can be sent in write())
+         and it crashed the server.  Affected file silcd/silcd.c.
+
 Fri Jun 29 20:05:25 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
 
        * Assure that sock->user_data is not NULL in the function
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 */