diff options
| author | tjg <tjg> | 1999-10-12 14:10:22 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:16 +0100 |
| commit | 84872e38eee4c7f5fec2a12563f9607e62c94219 (patch) | |
| tree | 72b29e19c760bdd81d2642a464bbc41937bbb5de /status.c | |
| parent | 43ce7b24fad3fc46860648d00544176526dcafcc (diff) | |
1999-10-12
Portability: status.c assumes traditional Unix layout of 0 and 1 exit
statuses in the parent, which is not shared by BeOS. Add mkstatval.c.
Diffstat (limited to 'status.c')
| -rw-r--r-- | status.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 */ |