Added an exit code to the blocking mode of OS::execute

Updated documentation accordingly.

Fixes #31881.
This commit is contained in:
Ruslan Mullayanov
2019-09-07 22:39:24 +05:00
committed by Rémi Verschelde
parent 084481b79d
commit b4c927b514
3 changed files with 7 additions and 4 deletions

View File

@ -314,7 +314,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo
}
int rv = pclose(f);
if (r_exitcode)
*r_exitcode = rv;
*r_exitcode = WEXITSTATUS(rv);
return OK;
}