mirror of
https://github.com/zoriya/ash.git
synced 2026-06-01 18:25:32 +00:00
fix exit
This commit is contained in:
@@ -87,6 +87,7 @@ int builtin_exit(char **argv, env_t *env)
|
||||
}
|
||||
if (!my_strisnum(ptr)) {
|
||||
dprintf(2, "exit: Expression Syntax.\n");
|
||||
env->vars = my_setenv(env->vars, "?", "1");
|
||||
return (0);
|
||||
}
|
||||
env->vars = my_setenv(env->vars, "?", argv[1]);
|
||||
|
||||
Reference in New Issue
Block a user