diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-22 08:52:17 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-22 08:54:30 +0800 |
commit | 1d9a11e381c1c2d29af7852aa655b4a504b5a7af (patch) | |
tree | cbf5d0816b46a9c3fa70f637fe2e1c2b74dc7b27 /shell | |
parent | f3c0b07212be3d3e5bcc7e1f9b904c675d488aab (diff) | |
download | gsoc2013-evolution-1d9a11e381c1c2d29af7852aa655b4a504b5a7af.tar.gz gsoc2013-evolution-1d9a11e381c1c2d29af7852aa655b4a504b5a7af.tar.zst gsoc2013-evolution-1d9a11e381c1c2d29af7852aa655b4a504b5a7af.zip |
Handle SIGTERM instead of SIGQUIT.
SIGQUIT is supposed to produce a core dump. We don't want that.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/main.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/shell/main.c b/shell/main.c index 94064034fa..cab5ab9717 100644 --- a/shell/main.c +++ b/shell/main.c @@ -267,13 +267,13 @@ idle_cb (gchar **uris) #ifndef G_OS_WIN32 static void -quit_signal (gint sig) +term_signal (gint sig) { EShell *shell; - g_return_if_fail (sig == SIGQUIT); + g_return_if_fail (sig == SIGTERM); - g_print ("Received quit signal...\n"); + g_print ("Received terminate signal...\n"); shell = e_shell_get_default (); @@ -282,20 +282,20 @@ quit_signal (gint sig) } static void -setup_quit_signal (void) +setup_term_signal (void) { struct sigaction sa, osa; - sigaction (SIGQUIT, NULL, &osa); + sigaction (SIGTERM, NULL, &osa); sa.sa_flags = 0; sigemptyset (&sa.sa_mask); - sa.sa_handler = quit_signal; - sigaction (SIGQUIT, &sa, NULL); + sa.sa_handler = term_signal; + sigaction (SIGTERM, &sa, NULL); } #else -#define setup_quit_signal() (void)0 +#define setup_term_signal() (void)0 #endif static GOptionEntry entries[] = { @@ -621,7 +621,7 @@ main (gint argc, gchar **argv) gconf_client_set_bool (client, key, FALSE, NULL); } - setup_quit_signal (); + setup_term_signal (); if (evolution_debug_log) { gint fd; |