Skip to content

Commit

Permalink
ifdef the return status so that non-plan9 systems get the real value
Browse files Browse the repository at this point in the history
  • Loading branch information
smazga committed Feb 5, 2023
1 parent 0aa5157 commit 27071e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,11 +684,15 @@ int main (int argc, char **argv) {
res = run_main(argc, argv);
if (sexp_fixnump(res)) {
int code = sexp_unbox_fixnum(res);
#ifdef PLAN9
if (code == 0) {
exit_success();
} else {
exit_failure();
}
#else
return code;
#endif
} else if (res == SEXP_FALSE) {
exit_failure();
} else {
Expand Down

0 comments on commit 27071e6

Please sign in to comment.