Commit 3b9b4d3f by Richard Stallman

(main): No program should return the error_count!

Return 2 if failure due to signal, 1 if just errors.
(execute): Increment signal_count.

From-SVN: r2068
parent 07d8ca2d
...@@ -826,6 +826,10 @@ static int argbuf_index; ...@@ -826,6 +826,10 @@ static int argbuf_index;
static int execution_count; static int execution_count;
/* Number of commands that exited with a signal. */
static int signal_count;
/* Name with which this program was invoked. */ /* Name with which this program was invoked. */
static char *programname; static char *programname;
...@@ -1726,8 +1730,11 @@ execute () ...@@ -1726,8 +1730,11 @@ execute ()
prog = commands[j].prog; prog = commands[j].prog;
if ((status & 0x7F) != 0) if ((status & 0x7F) != 0)
fatal ("Internal compiler error: program %s got fatal signal %d", {
prog, (status & 0x7F)); fatal ("Internal compiler error: program %s got fatal signal %d",
prog, (status & 0x7F));
signal_count++;
}
if (((status & 0xFF00) >> 8) >= MIN_FATAL_STATUS) if (((status & 0xFF00) >> 8) >= MIN_FATAL_STATUS)
ret_code = -1; ret_code = -1;
} }
...@@ -3474,7 +3481,7 @@ main (argc, argv) ...@@ -3474,7 +3481,7 @@ main (argc, argv)
delete_failure_queue (); delete_failure_queue ();
delete_temp_files (); delete_temp_files ();
exit (error_count); exit (error_count > 0 ? (signal_count ? 2 : 1) : 0);
/* NOTREACHED */ /* NOTREACHED */
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment