diff options
author | Andreas Kling <kling@serenityos.org> | 2020-01-27 20:48:42 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-01-27 20:48:42 +0100 |
commit | 74549267653764972efd2ce72e6face16356a136 (patch) | |
tree | be9064306454bd6fc93e5d185664274ce5f174e0 /Shell | |
parent | 65961d3ffc4bdb62fe6cf04abbe3ffdb8f1c8bce (diff) | |
download | serenity-74549267653764972efd2ce72e6face16356a136.zip |
Shell: If a command process is stopped, print the stop signal to stderr
Diffstat (limited to 'Shell')
-rw-r--r-- | Shell/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Shell/main.cpp b/Shell/main.cpp index 1f1bb44656..26ba668f4c 100644 --- a/Shell/main.cpp +++ b/Shell/main.cpp @@ -817,7 +817,7 @@ static int run_command(const String& cmd) if (i == 0) return_value = WEXITSTATUS(wstatus); } else if (WIFSTOPPED(wstatus)) { - printf("Shell: %s(%d) stopped.\n", child.name.characters(), child.pid); + fprintf(stderr, "Shell: %s(%d) %s\n", child.name.characters(), child.pid, strsignal(WSTOPSIG(wstatus))); } else { if (WIFSIGNALED(wstatus)) { printf("Shell: %s(%d) exited due to signal '%s'\n", child.name.characters(), child.pid, strsignal(WTERMSIG(wstatus))); |