mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-27 07:51:49 -07:00
Use WIFEXITED() and WEXITSTATUS() on Unix system() exit code
(ensures Odin run returns correct exit code of built executable) Adds test "tests/core/os/test_core_os_exit.odin" (Unix only)
This commit is contained in:
@@ -117,6 +117,9 @@ i32 system_exec_command_line_app(char const *name, char const *fmt, ...) {
|
||||
gb_printf_err("%s\n\n", cmd_line);
|
||||
}
|
||||
exit_code = system(cmd_line);
|
||||
if (WIFEXITED(exit_code)) {
|
||||
exit_code = WEXITSTATUS(exit_code);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (exit_code) {
|
||||
|
||||
Reference in New Issue
Block a user