From 19c67b8ee3bbcc287b38d1d3470090bcae8d31a8 Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Tue, 6 Jul 2004 07:20:08 +0000 Subject: [PATCH] terminate cleanly on SIGHUP --- AUTHORS | 1 + ChangeLog.claws | 6 ++++++ configure.ac | 2 +- src/main.c | 6 ++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index add183a63..dece2f138 100644 --- a/AUTHORS +++ b/AUTHORS @@ -206,3 +206,4 @@ contributors (beside the above; based on Changelog) Fabien Vantard Reza Pakdel Stephan Sachse + Thomas Gilgin diff --git a/ChangeLog.claws b/ChangeLog.claws index 3afb2065c..8ea109d6f 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,9 @@ +2004-07-06 [paul] 0.9.12cvs10 + + * src/main.c + terminate cleanly on SIGHUP. Patch submitted by + Thomas Gilgin + 2004-07-05 [christoph] 0.9.12cvs9 * src/inc.c diff --git a/configure.ac b/configure.ac index 4d97f6df2..aa05a3b60 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=12 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=9 +EXTRA_VERSION=10 EXTRA_RELEASE= if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then diff --git a/src/main.c b/src/main.c index d15a0cbc7..313dbddaa 100644 --- a/src/main.c +++ b/src/main.c @@ -934,6 +934,9 @@ static void install_basic_sighandlers() #ifdef SIGINT sigaddset(&mask, SIGINT); #endif +#ifdef SIGHUP + sigaddset(&mask, SIGHUP); +#endif act.sa_handler = quit_signal_handler; act.sa_mask = mask; @@ -945,6 +948,9 @@ static void install_basic_sighandlers() #ifdef SIGINT sigaction(SIGINT, &act, 0); #endif +#ifdef SIGHUP + sigaction(SIGHUP, &act, 0); +#endif sigprocmask(SIG_UNBLOCK, &mask, 0); } -- 2.25.1