From 0fa098845f0d7d7133b1fea5cde1211aef2ec4a9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 26 May 2019 02:07:03 +0200 Subject: [PATCH] Shell: When a command is terminated by a signal, print signal description. Previously we were only printing the signal number (except for SIGINT.) --- Shell/main.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Shell/main.cpp b/Shell/main.cpp index ffe4f550ef..2015d54af9 100644 --- a/Shell/main.cpp +++ b/Shell/main.cpp @@ -405,14 +405,7 @@ static int run_command(const String& cmd) return WEXITSTATUS(wstatus); } else { if (WIFSIGNALED(wstatus)) { - switch (WTERMSIG(wstatus)) { - case SIGINT: - printf("Interrupted\n"); - break; - default: - printf("Terminated by signal %d\n", WTERMSIG(wstatus)); - break; - } + puts(strsignal(WTERMSIG(wstatus))); } else { printf("Exited abnormally\n"); return 1;