diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-12-07 10:33:58 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-12-07 10:33:58 +0000 |
commit | f9bf1dc5580b6065f8b69668440325564be79594 (patch) | |
tree | 69e8d68a021a268fdff462caa14d34178b9a9b94 /Src/exec.c | |
parent | 176b4aeb54591ae7f937e754368de69e359b56d6 (diff) | |
download | zsh-f9bf1dc5580b6065f8b69668440325564be79594.tar.gz zsh-f9bf1dc5580b6065f8b69668440325564be79594.tar.xz zsh-f9bf1dc5580b6065f8b69668440325564be79594.zip |
Guillaume Chazarain: 24170: block interrupts around fork()
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c index cf79ea88b..6f16b9e87 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -229,6 +229,7 @@ zfork(struct timeval *tv) { pid_t pid; struct timezone dummy_tz; + sigset_t signals; /* * Is anybody willing to explain this test? @@ -239,7 +240,10 @@ zfork(struct timeval *tv) } if (tv) gettimeofday(tv, &dummy_tz); + sigfillset(&signals); + signals = signal_block(signals); pid = fork(); + signal_setmask(signals); if (pid == -1) { zerr("fork failed: %e", errno); return -1; |