summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-10-26 08:58:13 +0100
committerGitHub <noreply@github.com>2020-10-26 08:58:13 +0100
commitd77deda7b6dd931422b9184c91fd0054ebdc3f0f (patch)
tree6a6ba7d69c9d3fa4e0b4f7a4d9b81e8bdf219da7 /drivers
parent8ee44cc60ccedf8286b191218a2d25aa764ac413 (diff)
parent0d3a168a532349d0759a033b04efe04e5ef72c32 (diff)
Merge pull request #43056 from Ev1lbl0w/bugfix-wrong-exitcode
Fix wrong exit code being returned
Diffstat (limited to 'drivers')
-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 {