[evolution] Handle SIGTERM instead of SIGQUIT.



commit 1d9a11e381c1c2d29af7852aa655b4a504b5a7af
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat May 21 20:52:17 2011 -0400

    Handle SIGTERM instead of SIGQUIT.
    
    SIGQUIT is supposed to produce a core dump.  We don't want that.

 shell/main.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/shell/main.c b/shell/main.c
index 9406403..cab5ab9 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]