Blame SOURCES/evolution-3.8.5-restore-restarts-processes.patch

7c6d83
diff -up evolution-3.8.5/calendar/alarm-notify/notify-main.c.restore-restarts-processes evolution-3.8.5/calendar/alarm-notify/notify-main.c
7c6d83
--- evolution-3.8.5/calendar/alarm-notify/notify-main.c.restore-restarts-processes	2013-07-23 14:52:26.000000000 +0200
7c6d83
+++ evolution-3.8.5/calendar/alarm-notify/notify-main.c	2014-12-05 10:34:21.187168876 +0100
7c6d83
@@ -46,6 +46,18 @@
7c6d83
 
7c6d83
 #include "e-util/e-util-private.h"
7c6d83
 
7c6d83
+#ifdef G_OS_UNIX
7c6d83
+#include <glib-unix.h>
7c6d83
+
7c6d83
+static gboolean
7c6d83
+handle_term_signal (gpointer data)
7c6d83
+{
7c6d83
+	g_application_quit (data);
7c6d83
+
7c6d83
+	return FALSE;
7c6d83
+}
7c6d83
+#endif
7c6d83
+
7c6d83
 gint
7c6d83
 main (gint argc,
7c6d83
       gchar **argv)
7c6d83
@@ -114,6 +126,12 @@ main (gint argc,
7c6d83
 		return 0;
7c6d83
 	}
7c6d83
 
7c6d83
+#ifdef G_OS_UNIX
7c6d83
+	g_unix_signal_add_full (
7c6d83
+		G_PRIORITY_DEFAULT, SIGTERM,
7c6d83
+		handle_term_signal, alarm_notify_service, NULL);
7c6d83
+#endif
7c6d83
+
7c6d83
 	exit_status = g_application_run (
7c6d83
 		G_APPLICATION (alarm_notify_service), argc, argv);
7c6d83
 
7c6d83
diff -up evolution-3.8.5/modules/backup-restore/evolution-backup-tool.c.restore-restarts-processes evolution-3.8.5/modules/backup-restore/evolution-backup-tool.c
7c6d83
--- evolution-3.8.5/modules/backup-restore/evolution-backup-tool.c.restore-restarts-processes	2013-07-23 14:51:42.000000000 +0200
7c6d83
+++ evolution-3.8.5/modules/backup-restore/evolution-backup-tool.c	2014-12-05 10:34:21.187168876 +0100
7c6d83
@@ -684,6 +684,9 @@ restore (const gchar *filename,
7c6d83
 	if (g_cancellable_is_cancelled (cancellable))
7c6d83
 		return;
7c6d83
 
7c6d83
+	/* Make full-restart background processes after restore */
7c6d83
+	run_cmd (EVOLUTION " --force-shutdown");
7c6d83
+
7c6d83
 	txt = _("Reloading registry service");
7c6d83
 
7c6d83
 	/* wait few seconds, till changes settle */
7c6d83
diff -up evolution-3.8.5/shell/killev.c.restore-restarts-processes evolution-3.8.5/shell/killev.c
7c6d83
--- evolution-3.8.5/shell/killev.c.restore-restarts-processes	2013-07-23 14:52:25.000000000 +0200
7c6d83
+++ evolution-3.8.5/shell/killev.c	2014-12-05 10:34:21.187168876 +0100
7c6d83
@@ -166,6 +166,10 @@ main (gint argc,
7c6d83
 kill:
7c6d83
 #ifdef KILL_PROCESS_CMD
7c6d83
 	system (KILL_PROCESS_CMD " -QUIT evolution 2> /dev/null");
7c6d83
+	system (KILL_PROCESS_CMD " -TERM evolution-alarm-notify 2> /dev/null");
7c6d83
+	system (KILL_PROCESS_CMD " -QUIT evolution-source-registry 2> /dev/null");
7c6d83
+	system (KILL_PROCESS_CMD " -QUIT evolution-addressbook-factory 2> /dev/null");
7c6d83
+	system (KILL_PROCESS_CMD " -QUIT evolution-calendar-factory 2> /dev/null");
7c6d83
 #else
7c6d83
 	g_printerr ("No \"kill\" command available.\n");
7c6d83
 #endif