diff --git a/userspace/Shell/main.cpp b/userspace/Shell/main.cpp index 8af6561aaf..36952f3a12 100644 --- a/userspace/Shell/main.cpp +++ b/userspace/Shell/main.cpp @@ -395,7 +395,10 @@ int execute_command(BAN::Vector& args) if (tcsetpgrp(0, getpid()) == -1) ERROR_RETURN("tcsetpgrp", 1); - return status; + if (WIFSIGNALED(status)) + fprintf(stderr, "Terminated by signal %d\n", WTERMSIG(status)); + + return WEXITSTATUS(status); } return 0;