diff options
| author | Paul Eggert | 2013-07-01 14:06:12 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-01 14:06:12 -0700 |
| commit | 8f43ce497c3fcd76d0d3be2d8a0506c53c757fb3 (patch) | |
| tree | 196afeabe60fd7b5e2b1ec27e8d8f793c32edc11 /src/process.c | |
| parent | 24827db9c4dd4597715958a3f6178cd2173251e1 (diff) | |
| download | emacs-8f43ce497c3fcd76d0d3be2d8a0506c53c757fb3.tar.gz emacs-8f43ce497c3fcd76d0d3be2d8a0506c53c757fb3.zip | |
Fix bug re noninteractive multithreaded memory allocation.
* emacs.c (malloc_enable_thread): Hoist extern decl to top level.
(main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
Invoke malloc_enable_thread even when not interactive.
Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
* process.c (init_process_emacs) [CYGWIN]: Tickle glib even
in this case, since the underlying bug has now been fixed.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/process.c b/src/process.c index b63a985fcec..5fe07a9c4fa 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -7095,15 +7095,11 @@ init_process_emacs (void) | |||
| 7095 | if (! noninteractive || initialized) | 7095 | if (! noninteractive || initialized) |
| 7096 | #endif | 7096 | #endif |
| 7097 | { | 7097 | { |
| 7098 | #if defined HAVE_GLIB && !defined WINDOWSNT && !defined CYGWIN | 7098 | #if defined HAVE_GLIB && !defined WINDOWSNT |
| 7099 | /* Tickle glib's child-handling code. Ask glib to wait for Emacs itself; | 7099 | /* Tickle glib's child-handling code. Ask glib to wait for Emacs itself; |
| 7100 | this should always fail, but is enough to initialize glib's | 7100 | this should always fail, but is enough to initialize glib's |
| 7101 | private SIGCHLD handler, allowing the code below to copy it into | 7101 | private SIGCHLD handler, allowing catch_child_signal to copy |
| 7102 | LIB_CHILD_HANDLER. | 7102 | it into lib_child_handler. */ |
| 7103 | |||
| 7104 | For some reason tickling causes Cygwin bootstrap to fail, so it's | ||
| 7105 | skipped under Cygwin. FIXME: Skipping the tickling likely causes | ||
| 7106 | bugs in subprocess handling under Cygwin (Bug#14569). */ | ||
| 7107 | g_source_unref (g_child_watch_source_new (getpid ())); | 7103 | g_source_unref (g_child_watch_source_new (getpid ())); |
| 7108 | #endif | 7104 | #endif |
| 7109 | catch_child_signal (); | 7105 | catch_child_signal (); |