From b81f97bbd2de1e21ba99314fa1a130609db5646f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 14 May 2008 11:51:04 +0000 Subject: 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. --- shell/msh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell/msh.c') 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); } -- cgit v1.2.3