"exit NUMBER" should exit, not return

This commit is contained in:
Pavel Roskin 2000-09-15 00:46:51 +00:00
parent cbe05e45db
commit 5f84fd7066
3 changed files with 3 additions and 3 deletions

2
lash.c
View File

@ -225,7 +225,7 @@ static int builtin_exit(struct job *cmd, struct jobSet *junk)
if (!cmd->progs[0].argv[1] == 1) if (!cmd->progs[0].argv[1] == 1)
exit TRUE; exit TRUE;
return(atoi(cmd->progs[0].argv[1])); exit (atoi(cmd->progs[0].argv[1]));
} }
/* built-in 'fg' and 'bg' handler */ /* built-in 'fg' and 'bg' handler */

2
sh.c
View File

@ -225,7 +225,7 @@ static int builtin_exit(struct job *cmd, struct jobSet *junk)
if (!cmd->progs[0].argv[1] == 1) if (!cmd->progs[0].argv[1] == 1)
exit TRUE; exit TRUE;
return(atoi(cmd->progs[0].argv[1])); exit (atoi(cmd->progs[0].argv[1]));
} }
/* built-in 'fg' and 'bg' handler */ /* built-in 'fg' and 'bg' handler */

View File

@ -225,7 +225,7 @@ static int builtin_exit(struct job *cmd, struct jobSet *junk)
if (!cmd->progs[0].argv[1] == 1) if (!cmd->progs[0].argv[1] == 1)
exit TRUE; exit TRUE;
return(atoi(cmd->progs[0].argv[1])); exit (atoi(cmd->progs[0].argv[1]));
} }
/* built-in 'fg' and 'bg' handler */ /* built-in 'fg' and 'bg' handler */