summaryrefslogtreecommitdiff
path: root/shell/msh.c
diff options
context:
space:
mode:
authorMike Frysinger2008-05-14 11:51:04 +0000
committerMike Frysinger2008-05-14 11:51:04 +0000
commitb81f97bbd2de1e21ba99314fa1a130609db5646f (patch)
tree36493c17a018ea9862cc8d81115c5bbb7d990a75 /shell/msh.c
parent9305cdddbf83ed11fc8164e7f1e624538611be22 (diff)
downloadbusybox-b81f97bbd2de1e21ba99314fa1a130609db5646f.zip
busybox-b81f97bbd2de1e21ba99314fa1a130609db5646f.tar.gz
fix by Jie Zhang for exit status and POSIX compliance:
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html The exit status of a command that terminated because it received a signal shall be reported as greater than 128.
Diffstat (limited to 'shell/msh.c')
-rw-r--r--shell/msh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/msh.c b/shell/msh.c
index a96e799..aa6fb1d 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -3007,7 +3007,7 @@ static int waitfor(int lastpid, int canintr)
prs(" - core dumped");
if (rv >= ARRAY_SIZE(signame) || signame[rv])
prs("\n");
- rv = -1;
+ rv |= 0x80;
} else
rv = WAITVAL(s);
}