From 98d7dcbed94296961e776f2d15a6040887597251 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Tue, 3 Jul 2001 08:41:42 +0000 Subject: [PATCH] updates. --- CHANGES | 6 ++++++ apps/silcd/silcd.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGES b/CHANGES index 17073f9f..feb120c5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Tue Jul 3 11:39:20 EEST 2001 Pekka Riikonen + + * 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 * Assure that sock->user_data is not NULL in the function diff --git a/apps/silcd/silcd.c b/apps/silcd/silcd.c index 8fc77369..12763c0f 100644 --- a/apps/silcd/silcd.c +++ b/apps/silcd/silcd.c @@ -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 */ -- 2.24.0