From b4c927b514bcc550fb6f8f186219bb181aeeae33 Mon Sep 17 00:00:00 2001 From: Ruslan Mullayanov Date: Sat, 7 Sep 2019 22:39:24 +0500 Subject: Added an exit code to the blocking mode of OS::execute Updated documentation accordingly. Fixes #31881. --- drivers/unix/os_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/unix/os_unix.cpp') diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index bc57c0b8df..80d7a2ccaa 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -314,7 +314,7 @@ Error OS_Unix::execute(const String &p_path, const List &p_arguments, bo } int rv = pclose(f); if (r_exitcode) - *r_exitcode = rv; + *r_exitcode = WEXITSTATUS(rv); return OK; } -- cgit v1.2.3