summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
authorEv1lbl0w <ricasubtil@gmail.com>2020-10-24 19:16:49 +0100
committerEv1lbl0w <ricasubtil@gmail.com>2020-10-24 19:16:49 +0100
commit0d3a168a532349d0759a033b04efe04e5ef72c32 (patch)
tree377d24ea8c93973b68f25f4944cb61c36c6bcc5e /drivers/unix
parentd05c7da1aa0fa0c58d54dfaeca1e474cdd31a20c (diff)
Fix wrong exit code being returned
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/os_unix.cpp2
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 {