summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-06-14 05:26:28 +0000
committerPaul Smith <psmith@gnu.org>1999-06-14 05:26:28 +0000
commit187787286d9bc2f41696090917f47d9935651ddf (patch)
treece669419e8b2442a20e001ef3ec32090e07c3812 /job.c
parentfc0fe4103ac983d88b83dad0daf97664ffa8e04b (diff)
downloadgunmake-187787286d9bc2f41696090917f47d9935651ddf.tar.gz
* Various bug fixes.
Diffstat (limited to 'job.c')
-rw-r--r--job.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/job.c b/job.c
index 8a998ea..787678d 100644
--- a/job.c
+++ b/job.c
@@ -1024,7 +1024,6 @@ start_job_command (child)
dos_command_running = 1;
proc_return = system (cmdline);
- dos_command_running = 0;
environ = parent_environ;
execute_by_shell = 0; /* for the next time */
}
@@ -1032,9 +1031,16 @@ start_job_command (child)
{
dos_command_running = 1;
proc_return = spawnvpe (P_WAIT, argv[0], argv, child->environment);
- dos_command_running = 0;
}
+ /* Need to unblock signals before turning off
+ dos_command_running, so that child's signals
+ will be treated as such (see fatal_error_signal). */
+ unblock_sigs ();
+ dos_command_running = 0;
+
+ /* If the child got a signal, dos_status has its
+ high 8 bits set, so be careful not to alter them. */
if (proc_return == -1)
dos_status |= 0xff;
else