From fe46b3604b246839f6f9523fef4a12754dd0f836 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 22 Nov 2017 00:47:46 +0000 Subject: [PATCH] fcc: report signals as errors when sdcc crashes --- Library/tools/fcc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/tools/fcc.c b/Library/tools/fcc.c index 369bece9..671b2df1 100644 --- a/Library/tools/fcc.c +++ b/Library/tools/fcc.c @@ -359,6 +359,11 @@ static int do_command(void) default: while((w = wait(&status)) != pid); } + if (WIFSIGNALED(status)) { + fprintf(stderr, "%s exited with signal %s\n", + argvec[0], strsignal(WTERMSIG(status))); + return 255; + } return (WEXITSTATUS(status)); } -- 2.34.1