aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2008-06-20 07:12:01 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2008-06-20 07:12:01 +0000
commit059a6333c75b6d60aeeb3d541590d62607e42ff5 (patch)
treeba9ff3d0a2327dac60ee926b08a14b6877ac45f4 /src/main.c
parent419a8089a215b29590271d55195de36d26868d27 (diff)
block signals on handler call.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2021 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 1024b45e..c799d14b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1036,6 +1036,13 @@ static void register_system_events(void)
sa.sa_handler = sig_handler;
sa.sa_flags = SA_RESTART;
+ sigemptyset(&sa.sa_mask);
+ sigaddset(&sa.sa_mask, SIGHUP);
+ sigaddset(&sa.sa_mask, SIGINT);
+ sigaddset(&sa.sa_mask, SIGTERM);
+ sigaddset(&sa.sa_mask, SIGQUIT);
+ sigaddset(&sa.sa_mask, SIGPIPE);
+
sigaction(SIGHUP, &sa, NULL);
sigaction(SIGINT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);