diff options
author | Pavel Roskin <proski@gnu.org> | 2000-09-15 00:46:51 +0000 |
---|---|---|
committer | Pavel Roskin <proski@gnu.org> | 2000-09-15 00:46:51 +0000 |
commit | 5f84fd70662db883c1697038fa4c1a4bc8676862 (patch) | |
tree | 87ab9fc2d82f58f7d77a332849c00389e364b59d | |
parent | cbe05e45db168fabf807c3cf943a00ff81ec8279 (diff) | |
download | busybox-w32-5f84fd70662db883c1697038fa4c1a4bc8676862.tar.gz busybox-w32-5f84fd70662db883c1697038fa4c1a4bc8676862.tar.bz2 busybox-w32-5f84fd70662db883c1697038fa4c1a4bc8676862.zip |
"exit NUMBER" should exit, not return
-rw-r--r-- | lash.c | 2 | ||||
-rw-r--r-- | sh.c | 2 | ||||
-rw-r--r-- | shell/lash.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -225,7 +225,7 @@ static int builtin_exit(struct job *cmd, struct jobSet *junk) | |||
225 | if (!cmd->progs[0].argv[1] == 1) | 225 | if (!cmd->progs[0].argv[1] == 1) |
226 | exit TRUE; | 226 | exit TRUE; |
227 | 227 | ||
228 | return(atoi(cmd->progs[0].argv[1])); | 228 | exit (atoi(cmd->progs[0].argv[1])); |
229 | } | 229 | } |
230 | 230 | ||
231 | /* built-in 'fg' and 'bg' handler */ | 231 | /* built-in 'fg' and 'bg' handler */ |
@@ -225,7 +225,7 @@ static int builtin_exit(struct job *cmd, struct jobSet *junk) | |||
225 | if (!cmd->progs[0].argv[1] == 1) | 225 | if (!cmd->progs[0].argv[1] == 1) |
226 | exit TRUE; | 226 | exit TRUE; |
227 | 227 | ||
228 | return(atoi(cmd->progs[0].argv[1])); | 228 | exit (atoi(cmd->progs[0].argv[1])); |
229 | } | 229 | } |
230 | 230 | ||
231 | /* built-in 'fg' and 'bg' handler */ | 231 | /* built-in 'fg' and 'bg' handler */ |
diff --git a/shell/lash.c b/shell/lash.c index 7bc43190d..a2969082f 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -225,7 +225,7 @@ static int builtin_exit(struct job *cmd, struct jobSet *junk) | |||
225 | if (!cmd->progs[0].argv[1] == 1) | 225 | if (!cmd->progs[0].argv[1] == 1) |
226 | exit TRUE; | 226 | exit TRUE; |
227 | 227 | ||
228 | return(atoi(cmd->progs[0].argv[1])); | 228 | exit (atoi(cmd->progs[0].argv[1])); |
229 | } | 229 | } |
230 | 230 | ||
231 | /* built-in 'fg' and 'bg' handler */ | 231 | /* built-in 'fg' and 'bg' handler */ |