diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-03-26 17:41:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-26 17:41:41 +0100 |
| commit | 3bf820cf996df6e81ab4f7b02d25847633a6c2b2 (patch) | |
| tree | 07b350345d51df25ee208982c7ec3c0985439ff6 /src/main.cpp | |
| parent | f2b4087d80e9a0283a2e9dd8161de6e29c7ccff8 (diff) | |
| parent | 86614575126265a17e4a232522b7c08541375b76 (diff) | |
Merge pull request #1658 from gitlost/odin_run_unix_exit_code_WEXITSTATUS
Use `WIFEXITED()` and `WEXITSTATUS()` on Unix `system()` exit code
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 63b2c8386..905571f44 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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) { |