about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-12-07 14:07:50 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-12-07 14:07:50 +0000
commitc264a24a38188a2f8bd3e7a591490bb2cfddea26 (patch)
tree4a62c735390dada8d6d2a8c8f781853cb1bb30d6
parentcefc0d927f11f9749c082d58d65c3e9ac007e8a1 (diff)
downloadzsh-c264a24a38188a2f8bd3e7a591490bb2cfddea26.tar.gz
zsh-c264a24a38188a2f8bd3e7a591490bb2cfddea26.tar.xz
zsh-c264a24a38188a2f8bd3e7a591490bb2cfddea26.zip
unposted: add explanatory comment for blocking around fork()
-rw-r--r--ChangeLog2
-rw-r--r--Src/exec.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d9d15aa4..b52da96cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2007-12-07  Peter Stephenson  <pws@csr.com>
 
+	* Unposted: Src/exec.c: add explanatory comment for 24170/24179.
+
 	* 24180: configure.ac, Src/utils.c: back off (most of) 24148.
 
 	* 24179: Src/exec.c: alter 241770 to use queue_signals().
diff --git a/Src/exec.c b/Src/exec.c
index 9695011e3..3c13da476 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -239,6 +239,12 @@ zfork(struct timeval *tv)
     }
     if (tv)
 	gettimeofday(tv, &dummy_tz);
+    /*
+     * Queueing signals is necessary on Linux because fork()
+     * manipulates mutexes, leading to deadlock in memory
+     * allocation.  We don't expect fork() to be particularly
+     * zippy anyway.
+     */
     queue_signals();
     pid = fork();
     unqueue_signals();