mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
"exit NUMBER" should exit, not return
This commit is contained in:
parent
cbe05e45db
commit
5f84fd7066
2
lash.c
2
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 */
|
||||
|
2
sh.c
2
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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user