From: Paul Eggert Date: Tue, 11 Jun 2013 18:34:06 +0000 (-0700) Subject: Tickle glib by waiting for Emacs itself, not for process 0. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f7394b12358ae453a0c8b85fc307afc1b740010d;p=emacs.git Tickle glib by waiting for Emacs itself, not for process 0. * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]: Wait for self, not for 0. This can't hurt on GNU or similar system, and may help with Cygwin. Fixes: debbugs:14569 --- diff --git a/src/ChangeLog b/src/ChangeLog index 34876d4759b..b178f1130e0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2013-06-11 Paul Eggert + Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569). + * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]: + Wait for self, not for 0. This can't hurt on GNU or similar + system, and may help with Cygwin. + * keyboard.c: Don't use PROP (...) as an lvalue. (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]: Use set_prop (A, B), not PROP (A) = B. diff --git a/src/process.c b/src/process.c index e51b45bd64f..a873dd0cdb2 100644 --- a/src/process.c +++ b/src/process.c @@ -7068,9 +7068,10 @@ init_process_emacs (void) #endif { #if defined HAVE_GLIB && !defined WINDOWSNT - /* Tickle glib's child-handling code so that it initializes its + /* Tickle glib's child-handling code. Ask glib to wait for Emacs itself; + this should always fail, but is enough to initialize glib's private SIGCHLD handler. */ - g_source_unref (g_child_watch_source_new (0)); + g_source_unref (g_child_watch_source_new (getpid ())); #endif catch_child_signal (); }