diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-01-19 20:32:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-19 20:32:02 +0000 |
commit | 8f9ab92e25808922af0070f2c778ea2a2aa108eb (patch) | |
tree | 4275e9e7d8c510e342dd65dbae65c20f69dd1a34 /dmake | |
parent | b0ae2ae486fa42ce68dd63d71d85b585d04dcd4e (diff) |
distinguish between failure exit due to dmake failure vs signal aborted
Diffstat (limited to 'dmake')
-rw-r--r-- | dmake/dmake.h | 3 | ||||
-rw-r--r-- | dmake/quit.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/dmake/dmake.h b/dmake/dmake.h index 457031fdb50d..c3003a3db911 100644 --- a/dmake/dmake.h +++ b/dmake/dmake.h @@ -28,7 +28,8 @@ #define MAX_INC_DEPTH 10 /* max of ten nested include files */ #define MAX_COND_DEPTH 20 /* max nesting level of conditionals */ -#define ERROR_EXIT_VALUE 255 /* return code of aborted make */ +#define ERROR_ABORT_VALUE 254 /* return code of aborted make */ +#define ERROR_EXIT_VALUE 255 /* return code of failed make */ #define CONTINUATION_CHAR '\\' /* line continuation \<nl> */ #define DEF_ESCAPE_CHAR '\\' /* escape char for used chars */ #define ESCAPE_CHAR *Escape_char diff --git a/dmake/quit.c b/dmake/quit.c index 54043093de24..68ade197fd24 100644 --- a/dmake/quit.c +++ b/dmake/quit.c @@ -37,6 +37,8 @@ Quit( sig )/* ======== Error or quit */ int sig; { + int ret = ERROR_ABORT_VALUE; + if( sig == SIGINT ) fprintf(stderr, "Caught SIGINT. Trying to quit ...\n"); else @@ -48,7 +50,7 @@ int sig; #endif if( sig == 0 ) /* Don't be verbose during regular program termination. */ - ; + ret = ERROR_EXIT_VALUE; else fprintf(stderr, "Caught signal %d. Trying to quit ...\n", sig); @@ -78,7 +80,7 @@ int sig; if( _quitting == 0 ) _handle_quit( ".ERROR" ); Set_dir( Makedir ); /* No Error message if we can't do it */ - Epilog( ERROR_EXIT_VALUE ); + Epilog( ret ); } |