Merge pull request #43056 from Ev1lbl0w/bugfix-wrong-exitcode

Fix wrong exit code being returned
This commit is contained in:
Rémi Verschelde 2020-10-26 08:58:13 +01:00 committed by GitHub
commit d77deda7b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {