aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog10
-rw-r--r--src/emacs.c11
-rw-r--r--src/process.c10
3 files changed, 17 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 23e9502e3b5..061083af6cd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12013-07-01 Paul Eggert <eggert@cs.ucla.edu>
2
3 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
4 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
5 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
6 Invoke malloc_enable_thread even when not interactive.
7 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
8 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
9 in this case, since the underlying bug has now been fixed.
10
12013-07-01 Juanma Barranquero <lekktu@gmail.com> 112013-07-01 Juanma Barranquero <lekktu@gmail.com>
2 12
3 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before 13 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
diff --git a/src/emacs.c b/src/emacs.c
index 77ae977b37c..08be786de95 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -127,6 +127,8 @@ extern int malloc_set_state (void*);
127/* True if the MALLOC_CHECK_ environment variable was set while 127/* True if the MALLOC_CHECK_ environment variable was set while
128 dumping. Used to work around a bug in glibc's malloc. */ 128 dumping. Used to work around a bug in glibc's malloc. */
129static bool malloc_using_checking; 129static bool malloc_using_checking;
130#elif defined HAVE_PTHREAD && !defined SYSTEM_MALLOC
131extern void malloc_enable_thread (void);
130#endif 132#endif
131 133
132Lisp_Object Qfile_name_handler_alist; 134Lisp_Object Qfile_name_handler_alist;
@@ -1074,13 +1076,8 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1074#endif /* DOS_NT */ 1076#endif /* DOS_NT */
1075 } 1077 }
1076 1078
1077#if defined (HAVE_PTHREAD) && !defined (SYSTEM_MALLOC) && !defined (DOUG_LEA_MALLOC) 1079#if defined HAVE_PTHREAD && !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC
1078 if (! noninteractive) 1080 malloc_enable_thread ();
1079 {
1080 extern void malloc_enable_thread (void);
1081
1082 malloc_enable_thread ();
1083 }
1084#endif 1081#endif
1085 1082
1086 init_signals (dumping); 1083 init_signals (dumping);
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 ();