aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 2146349ab..0cdfd2b1c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6683,10 +6683,10 @@ sprint_status(char *s, int status, int sigonly)
col = 0;
st = WEXITSTATUS(status);
if (!WIFEXITED(status)) {
- st = WSTOPSIG(status);
+ st = WTERMSIG(status);
#if JOBS
- if (!WIFSTOPPED(status))
- st = WTERMSIG(status);
+ if (WIFSTOPPED(status))
+ st = WSTOPSIG(status);
#endif
if (sigonly) {
if (st == SIGINT || st == SIGPIPE)