diff options
author | Ev1lbl0w <ricasubtil@gmail.com> | 2020-10-24 19:16:49 +0100 |
---|---|---|
committer | Ev1lbl0w <ricasubtil@gmail.com> | 2020-10-24 19:16:49 +0100 |
commit | 0d3a168a532349d0759a033b04efe04e5ef72c32 (patch) | |
tree | 377d24ea8c93973b68f25f4944cb61c36c6bcc5e /drivers/unix | |
parent | d05c7da1aa0fa0c58d54dfaeca1e474cdd31a20c (diff) |
Fix wrong exit code being returned
Diffstat (limited to 'drivers/unix')
-rw-r--r-- | drivers/unix/os_unix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 96c338f86b..eec6eb8303 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -331,7 +331,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo int status; waitpid(pid, &status, 0); if (r_exitcode) { - *r_exitcode = WEXITSTATUS(status); + *r_exitcode = WIFEXITED(status) ? WEXITSTATUS(status) : status; } } else { |