forked from Bananymous/banan-os
Shell: Print if the process exited because of a signal
This commit is contained in:
parent
217dbca7b7
commit
9fe878bbec
|
@ -395,7 +395,10 @@ int execute_command(BAN::Vector<BAN::String>& 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;
|
||||
|
|
Loading…
Reference in New Issue