diff options
| author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-12-09 02:07:09 +0000 |
|---|---|---|
| committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-12-09 02:07:09 +0000 |
| commit | cc418866a1dc7aa2ed8a67c711c2ea609bf06752 (patch) | |
| tree | f9e08ae812638ec7b436d77a3eb387b812de4f04 | |
| parent | Do 24180 on 4.2 branch: reverted (most of) 24148. (diff) | |
| download | zsh-cc418866a1dc7aa2ed8a67c711c2ea609bf06752.tar zsh-cc418866a1dc7aa2ed8a67c711c2ea609bf06752.tar.gz zsh-cc418866a1dc7aa2ed8a67c711c2ea609bf06752.tar.bz2 zsh-cc418866a1dc7aa2ed8a67c711c2ea609bf06752.tar.lz zsh-cc418866a1dc7aa2ed8a67c711c2ea609bf06752.tar.xz zsh-cc418866a1dc7aa2ed8a67c711c2ea609bf06752.tar.zst zsh-cc418866a1dc7aa2ed8a67c711c2ea609bf06752.zip | |
Merge of Guillaume Chazarain's 24170: block interrupts around fork
since it may mess with locks.
| -rw-r--r-- | Src/exec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c index 19d68060f..76bd8638a 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -228,7 +228,15 @@ 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(); if (pid == -1) { zerr("fork failed: %e", NULL, errno); return -1; |
