aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f4d296289..aa2a93bca 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -4610,7 +4610,7 @@ getstatus(struct job *job)
job->sigint = 1;
#endif
}
- retval += 128;
+ retval |= 128;
}
TRACE(("getstatus: job %d, nproc %d, status 0x%x, retval 0x%x\n",
jobno(job), job->nprocs, status, retval));
@@ -4676,7 +4676,7 @@ waitcmd(int argc UNUSED_PARAM, char **argv)
if (status != -1 && !WIFSTOPPED(status)) {
retval = WEXITSTATUS(status);
if (WIFSIGNALED(status))
- retval = WTERMSIG(status) + 128;
+ retval = 128 | WTERMSIG(status);
goto ret;
}
}
@@ -4711,7 +4711,7 @@ waitcmd(int argc UNUSED_PARAM, char **argv)
ret:
return retval;
sigout:
- retval = 128 + pending_sig;
+ retval = 128 | pending_sig;
return retval;
}