mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
Shell: When a command is terminated by a signal, print signal description.
Previously we were only printing the signal number (except for SIGINT.)
This commit is contained in:
parent
7c37ffd9d8
commit
0fa098845f
Notes:
sideshowbarker
2024-07-19 13:56:40 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/0fa098845f0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user