From 5f84fd70662db883c1697038fa4c1a4bc8676862 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 15 Sep 2000 00:46:51 +0000 Subject: "exit NUMBER" should exit, not return --- lash.c | 2 +- sh.c | 2 +- shell/lash.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lash.c b/lash.c index 7bc43190d..a2969082f 100644 --- 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 7bc43190d..a2969082f 100644 --- 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 */ 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) 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 */ -- cgit v1.2.3