mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
Have sh print out which signal terminated a child process.
This commit is contained in:
parent
a685809e75
commit
cddd2f37e9
1 changed files with 5 additions and 1 deletions
|
@ -148,7 +148,11 @@ static int runcmd(char* cmd)
|
|||
if (WIFEXITED(wstatus)) {
|
||||
//printf("Exited normally with status %d\n", WEXITSTATUS(wstatus));
|
||||
} else {
|
||||
printf("Exited abnormally\n");
|
||||
if (WIFSIGNALED(wstatus)) {
|
||||
printf("Terminated by signal %d\n", WTERMSIG(wstatus));
|
||||
} else {
|
||||
printf("Exited abnormally\n");
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue