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
This commit is contained in:
Paul Eggert 2013-06-11 11:34:06 -07:00
parent b0e2283134
commit f7394b1235
2 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,10 @@
2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
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.

View file

@ -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 ();
}