[PATCH] Fix exit value in hush

Jie Zhang jie.zhang at analog.com
Mon Jan 4 09:38:32 UTC 2010


When WIFSIGNALED, the exit value should be sig + 128.

Signed-off-by: Jie Zhang <jie.zhang at analog.com>
---
 shell/hush.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/shell/hush.c b/shell/hush.c
index 3044024..8dfda7b 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -3906,6 +3906,7 @@ static int checkjobs(struct pipe* fg_pipe)
 						if (WIFSIGNALED(status)) {
 							int sig = WTERMSIG(status);
 							printf("%s\n", sig == SIGINT ? "" : get_signame(sig));
+							rcode = sig + 128;
 						}
 					}
 				} else {
-- 
1.6.5.7



More information about the busybox mailing list