mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-08 10:50:28 +00:00
cocmd: progpogate exit status from semicolon
This commit is contained in:
parent
f4516567ff
commit
7f9f3c7e21
1 changed files with 2 additions and 2 deletions
|
@ -399,7 +399,7 @@ static int Fake(int main(int, char **)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int TryBuiltin(void) {
|
static int TryBuiltin(void) {
|
||||||
if (!n) return 0;
|
if (!n) return exitstatus;
|
||||||
if (!strcmp(args[0], "exit")) Exit();
|
if (!strcmp(args[0], "exit")) Exit();
|
||||||
if (!strcmp(args[0], "cd")) return Cd();
|
if (!strcmp(args[0], "cd")) return Cd();
|
||||||
if (!strcmp(args[0], "rm")) return Rm();
|
if (!strcmp(args[0], "rm")) return Rm();
|
||||||
|
@ -570,7 +570,7 @@ static char *Tokenize(void) {
|
||||||
if (q > r) {
|
if (q > r) {
|
||||||
return Finish();
|
return Finish();
|
||||||
} else {
|
} else {
|
||||||
Run();
|
exitstatus = Run();
|
||||||
t = STATE_WHITESPACE;
|
t = STATE_WHITESPACE;
|
||||||
}
|
}
|
||||||
} else if (*p == '>') {
|
} else if (*p == '>') {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue