[evolution/evolution-3-12] Bug 706993 - Restart background processes after restore
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/evolution-3-12] Bug 706993 - Restart background processes after restore
- Date: Fri, 5 Dec 2014 11:43:06 +0000 (UTC)
commit 8a25e32682a062d9b8488855197c250f0f8d0aa6
Author: Milan Crha <mcrha redhat com>
Date: Fri Dec 5 12:40:01 2014 +0100
Bug 706993 - Restart background processes after restore
calendar/alarm-notify/notify-main.c | 18 ++++++++++++++++++
modules/backup-restore/evolution-backup-tool.c | 3 +++
shell/killev.c | 8 ++++++++
3 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/calendar/alarm-notify/notify-main.c b/calendar/alarm-notify/notify-main.c
index 11fd5a9..ff33344 100644
--- a/calendar/alarm-notify/notify-main.c
+++ b/calendar/alarm-notify/notify-main.c
@@ -45,6 +45,18 @@
#include "e-util/e-util-private.h"
+#ifdef G_OS_UNIX
+#include <glib-unix.h>
+
+static gboolean
+handle_term_signal (gpointer data)
+{
+ g_application_quit (data);
+
+ return FALSE;
+}
+#endif
+
gint
main (gint argc,
gchar **argv)
@@ -113,6 +125,12 @@ main (gint argc,
return 0;
}
+#ifdef G_OS_UNIX
+ g_unix_signal_add_full (
+ G_PRIORITY_DEFAULT, SIGTERM,
+ handle_term_signal, alarm_notify_service, NULL);
+#endif
+
exit_status = g_application_run (
G_APPLICATION (alarm_notify_service), argc, argv);
diff --git a/modules/backup-restore/evolution-backup-tool.c b/modules/backup-restore/evolution-backup-tool.c
index 4b75f8a..91cba6c 100644
--- a/modules/backup-restore/evolution-backup-tool.c
+++ b/modules/backup-restore/evolution-backup-tool.c
@@ -684,6 +684,9 @@ restore (const gchar *filename,
if (g_cancellable_is_cancelled (cancellable))
return;
+ /* Make full-restart background processes after restore */
+ run_cmd (EVOLUTION " --force-shutdown");
+
txt = _("Reloading registry service");
/* wait few seconds, till changes settle */
diff --git a/shell/killev.c b/shell/killev.c
index f13cbee..be8ec79 100644
--- a/shell/killev.c
+++ b/shell/killev.c
@@ -164,6 +164,14 @@ kill:
#ifdef KILL_PROCESS_CMD
if (system (KILL_PROCESS_CMD " -QUIT evolution 2> /dev/null") == -1)
g_warning ("%s: Failed to execute: '%s'", G_STRFUNC, KILL_PROCESS_CMD);
+ if (system (KILL_PROCESS_CMD " -TERM evolution-alarm-notify 2> /dev/null") == -1)
+ g_warning ("%s: Failed to execute: '%s'", G_STRFUNC, KILL_PROCESS_CMD);
+ if (system (KILL_PROCESS_CMD " -QUIT evolution-source-registry 2> /dev/null") == -1)
+ g_warning ("%s: Failed to execute: '%s'", G_STRFUNC, KILL_PROCESS_CMD);
+ if (system (KILL_PROCESS_CMD " -QUIT evolution-addressbook-factory 2> /dev/null") == -1)
+ g_warning ("%s: Failed to execute: '%s'", G_STRFUNC, KILL_PROCESS_CMD);
+ if (system (KILL_PROCESS_CMD " -QUIT evolution-calendar-factory 2> /dev/null") == -1)
+ g_warning ("%s: Failed to execute: '%s'", G_STRFUNC, KILL_PROCESS_CMD);
#else
g_printerr ("No \"kill\" command available.\n");
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]