tracker r1380 - branches/indexer-split/src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1380 - branches/indexer-split/src/trackerd
- Date: Thu, 8 May 2008 17:42:08 +0100 (BST)
Author: mr
Date: Thu May 8 16:42:08 2008
New Revision: 1380
URL: http://svn.gnome.org/viewvc/tracker?rev=1380&view=rev
Log:
Modified:
branches/indexer-split/src/trackerd/tracker-main.c
Modified: branches/indexer-split/src/trackerd/tracker-main.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-main.c (original)
+++ branches/indexer-split/src/trackerd/tracker-main.c Thu May 8 16:42:08 2008
@@ -236,47 +236,6 @@
}
static void
-signal_handler (gint signo)
-{
- static gboolean in_loop = FALSE;
-
- /* Die if we get re-entrant signals handler calls */
- if (in_loop) {
- exit (EXIT_FAILURE);
- }
-
- switch (signo) {
- case SIGSEGV:
- /* We are screwed if we get this so exit immediately! */
- exit (EXIT_FAILURE);
-
- case SIGBUS:
- case SIGILL:
- case SIGFPE:
- case SIGPIPE:
- case SIGABRT:
- case SIGTERM:
- case SIGINT:
- in_loop = TRUE;
-
- tracker->is_running = FALSE;
- tracker_end_watching ();
-
- g_timeout_add_full (G_PRIORITY_LOW, 1,
- (GSourceFunc) tracker_shutdown,
- g_strdup (g_strsignal (signo)), NULL);
-
- default:
- if (g_strsignal (signo)) {
- tracker_log ("Received signal:%d->'%s'",
- signo,
- g_strsignal (signo));
- }
- break;
- }
-}
-
-static void
log_option_list (GSList *list,
const gchar *str)
{
@@ -403,6 +362,47 @@
}
static void
+signal_handler (gint signo)
+{
+ static gboolean in_loop = FALSE;
+
+ /* Die if we get re-entrant signals handler calls */
+ if (in_loop) {
+ exit (EXIT_FAILURE);
+ }
+
+ switch (signo) {
+ case SIGSEGV:
+ /* We are screwed if we get this so exit immediately! */
+ exit (EXIT_FAILURE);
+
+ case SIGBUS:
+ case SIGILL:
+ case SIGFPE:
+ case SIGPIPE:
+ case SIGABRT:
+ case SIGTERM:
+ case SIGINT:
+ in_loop = TRUE;
+
+ tracker->is_running = FALSE;
+ tracker_end_watching ();
+
+ g_timeout_add_full (G_PRIORITY_LOW, 1,
+ (GSourceFunc) tracker_shutdown,
+ g_strdup (g_strsignal (signo)), NULL);
+
+ default:
+ if (g_strsignal (signo)) {
+ tracker_log ("Received signal:%d->'%s'",
+ signo,
+ g_strsignal (signo));
+ }
+ break;
+ }
+}
+
+static void
initialise_signal_handler (void)
{
#ifndef OS_WIN32
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]