Fixed exit when boolean is passed

Return abnomal status code when false is passed, per R7RS
This commit is contained in:
Justin Ethier 2019-07-20 17:00:52 -04:00
parent 647e2030ff
commit 574cc630d0
2 changed files with 7 additions and 0 deletions

View file

@ -12,6 +12,9 @@ Features
Bug Fixes
- Fixed the MSYS2 build script and instructions, so it is possible to build on Windows again!
- Fixed `exit` to return the appropriate status code when a boolean is passed, per R7RS:
> If no argument is supplied, or if obj is #t, the exit procedure should communicate to the operating system that the program exited normally. If obj is #f, the exit procedure should communicate to the operating system that the program exited abnormally.
Deprecated

View file

@ -3193,6 +3193,10 @@ void Cyc_halt(object obj)
exit(obj_obj2int(obj));
}
if (obj == boolean_f) {
exit(1);
}
exit(0);
}