Browse Source

Fix exit status handling

master
Jake Wakeling 3 months ago
parent
commit
e87cff2c49
  1. 2
      src/eval.c
  2. 2
      src/exec.c

2
src/eval.c

@ -47,7 +47,7 @@ extern void eval(u8 *src, UINT len) {
ast a = parse(&l); if (!a) { goto ret; }
if (Pflag) { ast_debug(a); goto ret; }
_ret = WEXITSTATUS(execute(a));
_ret = execute(a);
ret:;
ast_free(a);

2
src/exec.c

@ -79,7 +79,7 @@ static int execute_comm(ast a) {
}
}
return launch((u8 **)a->c->data);
return WEXITSTATUS(launch((u8 **)a->c->data));
}
/* Fork and execute an executable. */

Loading…
Cancel
Save