summaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorToby Goodwin <tjg@star.le.ac.uk>1999-11-10 14:55:51 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:22:10 +0100
commit3e9e4d3f8f518f8f467066593ae6f270d97f6d60 (patch)
tree7d41f75ee428d4bb332b9664c116a8a6ce6ccea0 /status.c
parent3815ffb98e9db3d593219cead05284f983eb6d71 (diff)
beta: rc-1.6b1
Diffstat (limited to 'status.c')
-rw-r--r--status.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/status.c b/status.c
index b594e4b..5b37aa5 100644
--- a/status.c
+++ b/status.c
@@ -2,6 +2,7 @@
#include "rc.h"
#include "sigmsgs.h"
+#include "statval.h"
#include "wait.h"
/* status == the wait() value of the last command in the pipeline, or the last command */
@@ -40,7 +41,7 @@ extern int getstatus() {
}
extern void set(bool code) {
- setstatus(-1, (!code) << 8); /* exit status 1 == 0x100 */
+ setstatus(-1, code ? STATUS0 : STATUS1);
}
/* take a pipeline and store the exit statuses. Check to see whether any of the children dumped core */