[geany/geany] fbb89f: Remove illegal signal handling

Lex Trotman git-noreply at xxxxx
Sat Sep 22 03:40:33 UTC 2012


Branch:      refs/heads/master
Author:      Lex Trotman <elextr at gmail.com>
Committer:   Lex Trotman <elextr at gmail.com>
Date:        Sat, 22 Sep 2012 03:40:33
Commit:      fbb89f523af47b35e238678d348cfa98e56c760a
             https://github.com/geany/geany/commit/fbb89f523af47b35e238678d348cfa98e56c760a

Log Message:
-----------
Remove illegal signal handling

The SIGTERM handler called the standard exit callback which uses
functions that are illegal in signal handlers.  Commented out as
a prelude to full removal if no use case can be made.


Modified Paths:
--------------
    src/main.c

Modified: src/main.c
9 files changed, 5 insertions(+), 4 deletions(-)
===================================================================
@@ -748,7 +748,8 @@ static gint setup_config_dir(void)
 	return mkdir_result;
 }
 
-
+/* Signal handling removed since on_exit_clicked() uses functions that are
+ * illegal in signal handlers
 static void signal_cb(gint sig)
 {
 	if (sig == SIGTERM)
@@ -756,7 +757,7 @@ static void signal_cb(gint sig)
 		on_exit_clicked(NULL, NULL);
 	}
 }
-
+ */
 
 /* Used for command-line arguments at startup or from socket.
  * this will strip any :line:col filename suffix from locale_filename */
@@ -972,8 +973,8 @@ gint main(gint argc, gchar **argv)
 	 * dependencies (e.g. WebKit, Soup, ...) */
 	if (!g_thread_supported())
 		g_thread_init(NULL);
-
-	signal(SIGTERM, signal_cb);
+    /* removed as signal handling was wrong, see signal_cb()
+	signal(SIGTERM, signal_cb); */
 #ifdef G_OS_UNIX
 	/* SIGQUIT is used to kill spawned children and we get also this signal, so ignore */
 	signal(SIGQUIT, SIG_IGN);



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Commits mailing list