diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-05-14 11:51:04 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-05-14 11:51:04 +0000 |
commit | b81f97bbd2de1e21ba99314fa1a130609db5646f (patch) | |
tree | 36493c17a018ea9862cc8d81115c5bbb7d990a75 /shell | |
parent | 9305cdddbf83ed11fc8164e7f1e624538611be22 (diff) |
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')
-rw-r--r-- | shell/msh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/msh.c b/shell/msh.c index a96e799e2..aa6fb1d26 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); } |