[evolution-data-server] Handle SIGTERM instead of SIGQUIT.



commit 47811a541e2e1eed4306b4a5f7419d1e0776d797
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat May 21 20:54:47 2011 -0400

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

 addressbook/libedata-book/e-data-book-factory.c |   16 ++++++++--------
 calendar/libedata-cal/e-data-cal-factory.c      |   16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/addressbook/libedata-book/e-data-book-factory.c b/addressbook/libedata-book/e-data-book-factory.c
index b8aa145..a4776fb 100644
--- a/addressbook/libedata-book/e-data-book-factory.c
+++ b/addressbook/libedata-book/e-data-book-factory.c
@@ -578,25 +578,25 @@ on_name_lost (GDBusConnection *connection,
 
 #ifndef G_OS_WIN32
 static void
-quit_signal (gint sig)
+term_signal (gint sig)
 {
-	g_return_if_fail (sig == SIGQUIT);
+	g_return_if_fail (sig == SIGTERM);
 
-	g_print ("Received quit signal...\n");
+	g_print ("Received terminate signal...\n");
 	g_main_loop_quit (loop);
 }
 
 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);
 }
 #endif
 
@@ -678,7 +678,7 @@ main (gint argc, gchar **argv)
 	e_data_book_migrate_basedir ();
 
 #ifndef G_OS_WIN32
-	setup_quit_signal ();
+	setup_term_signal ();
 #endif
 
 	g_print ("Server is up and running...\n");
diff --git a/calendar/libedata-cal/e-data-cal-factory.c b/calendar/libedata-cal/e-data-cal-factory.c
index 0b02e42..7e4bbda 100644
--- a/calendar/libedata-cal/e-data-cal-factory.c
+++ b/calendar/libedata-cal/e-data-cal-factory.c
@@ -895,25 +895,25 @@ on_name_lost (GDBusConnection *connection,
 
 #ifndef G_OS_WIN32
 static void
-quit_signal (gint sig)
+term_signal (gint sig)
 {
-	g_return_if_fail (sig == SIGQUIT);
+	g_return_if_fail (sig == SIGTERM);
 
-	g_print ("Received quit signal...\n");
+	g_print ("Received terminate signal...\n");
 	g_main_loop_quit (loop);
 }
 
 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);
 }
 #endif
 
@@ -1003,7 +1003,7 @@ main (gint argc, gchar **argv)
 	e_data_cal_migrate_basedir ();
 
 #ifndef G_OS_WIN32
-	setup_quit_signal ();
+	setup_term_signal ();
 #endif
 
 	g_print ("Server is up and running...\n");



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