From 187787286d9bc2f41696090917f47d9935651ddf Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 14 Jun 1999 05:26:28 +0000 Subject: [PATCH] * Various bug fixes. --- ChangeLog | 14 ++++++++++++++ commands.c | 2 +- expand.c | 2 +- job.c | 10 ++++++++-- main.c | 5 ++++- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb8832a1..07c495b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,22 @@ +1999-04-26 Paul D. Smith + + * main.c (main): Reset read_makefiles to empty after processing so + we get the right error message. + 1999-04-25 Paul D. Smith * make.texinfo: Updates to @dircategory and @direntry suggested by Karl Berry . +1999-04-23 Eli Zaretskii + + * job.c (start_job_command) [__MSDOS__]: Call unblock_sigs before + turning off dos_command_running, so child's signals produce the + right effect. + + * commands.c (fatal_error_signal) [__MSDOS__]: Use EXIT_FAILURE + instead of 1. + 1999-04-18 Eli Zaretskii * configh.dos.template: Update to recognize that version 2.02 of diff --git a/commands.c b/commands.c index 58107efe..dd7b1bef 100644 --- a/commands.c +++ b/commands.c @@ -380,7 +380,7 @@ fatal_error_signal (sig) return; } remove_intermediates (1); - exit (1); + exit (EXIT_FAILURE); #else /* not __MSDOS__ */ #ifdef _AMIGA remove_intermediates (1); diff --git a/expand.c b/expand.c index db29174b..0b1d41db 100644 --- a/expand.c +++ b/expand.c @@ -398,7 +398,7 @@ char * variable_expand (line) char *line; { - return variable_expand_string(NULL, line, -1); + return variable_expand_string(NULL, line, (long)-1); } /* Expand an argument for an expansion function. diff --git a/job.c b/job.c index 8a998ea4..787678d0 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 diff --git a/main.c b/main.c index 9850fbce..fc5b3358 100644 --- a/main.c +++ b/main.c @@ -1496,10 +1496,13 @@ int main (int argc, char ** argv) else { /* A normal makefile. We must die later. */ - error (NILF, "Makefile `%s' was not found", dep_name (d)); + error (NILF, "Makefile `%s' was not found", + dep_name (d)); any_failed = 1; } } + /* Reset this to empty so we get the right error message below. */ + read_makefiles = 0; if (any_remade) goto re_exec;