"exit NUMBER" should exit, not return
authorPavel Roskin <proski@gnu.org>
Fri, 15 Sep 2000 00:46:51 +0000 (00:46 -0000)
committerPavel Roskin <proski@gnu.org>
Fri, 15 Sep 2000 00:46:51 +0000 (00:46 -0000)
lash.c
sh.c
shell/lash.c

diff --git a/lash.c b/lash.c
index 7bc43190db55a43bc4a8a520b8b77bf94ca9bff2..a2969082f12ada8f92b804a2627b15897b051c90 100644 (file)
--- a/lash.c
+++ b/lash.c
@@ -225,7 +225,7 @@ static int builtin_exit(struct job *cmd, struct jobSet *junk)
        if (!cmd->progs[0].argv[1] == 1)
                exit TRUE;
 
-       return(atoi(cmd->progs[0].argv[1]));
+       exit (atoi(cmd->progs[0].argv[1]));
 }
 
 /* built-in 'fg' and 'bg' handler */
diff --git a/sh.c b/sh.c
index 7bc43190db55a43bc4a8a520b8b77bf94ca9bff2..a2969082f12ada8f92b804a2627b15897b051c90 100644 (file)
--- a/sh.c
+++ b/sh.c
@@ -225,7 +225,7 @@ static int builtin_exit(struct job *cmd, struct jobSet *junk)
        if (!cmd->progs[0].argv[1] == 1)
                exit TRUE;
 
-       return(atoi(cmd->progs[0].argv[1]));
+       exit (atoi(cmd->progs[0].argv[1]));
 }
 
 /* built-in 'fg' and 'bg' handler */
index 7bc43190db55a43bc4a8a520b8b77bf94ca9bff2..a2969082f12ada8f92b804a2627b15897b051c90 100644 (file)
@@ -225,7 +225,7 @@ static int builtin_exit(struct job *cmd, struct jobSet *junk)
        if (!cmd->progs[0].argv[1] == 1)
                exit TRUE;
 
-       return(atoi(cmd->progs[0].argv[1]));
+       exit (atoi(cmd->progs[0].argv[1]));
 }
 
 /* built-in 'fg' and 'bg' handler */