aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-22 08:52:17 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:17 +0800
commit794ec7dbb6e7effb40f9d6659bfeb91a321ca10c (patch)
treeb6d9dc459713b2bcfe562b3b7c69dbc677694860 /shell
parentbefa850712a3b3bc147d017a514b9fa43224213e (diff)
downloadgsoc2013-evolution-794ec7dbb6e7effb40f9d6659bfeb91a321ca10c.tar.gz
gsoc2013-evolution-794ec7dbb6e7effb40f9d6659bfeb91a321ca10c.tar.zst
gsoc2013-evolution-794ec7dbb6e7effb40f9d6659bfeb91a321ca10c.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.c18
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;