aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 270a338d9..db7dffc72 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13427,13 +13427,8 @@ exitcmd(int argc UNUSED_PARAM, char **argv)
if (stoppedjobs())
return 0;
- if (argv[1]) {
- int status = number(argv[1]);
-
- exitstatus = status;
- if (savestatus >= 0)
- savestatus = status;
- }
+ if (argv[1])
+ savestatus = number(argv[1]);
raise_exception(EXEXIT);
/* NOTREACHED */