Mercurial > mxe-octave
changeset 6777:392c5255d044 release
Return exit code of Octave executable from launcher (patch #10370).
* installer-files/octave-launch.c: Get exit code from spawned Octave process
and return it from the launcher.
author | Vipul Cariappa <vipulcariappa@gmail.com> |
---|---|
date | Sat, 15 Jul 2023 20:34:39 +0530 |
parents | a0de673943ed |
children | 412c0c493679 ecb84ac8b317 |
files | installer-files/octave-launch.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/installer-files/octave-launch.c Mon Jul 10 16:59:23 2023 -0400 +++ b/installer-files/octave-launch.c Sat Jul 15 20:34:39 2023 +0530 @@ -398,9 +398,13 @@ /* Wait until child process exits. */ WaitForSingleObject (pi.hProcess, INFINITE); + /* Get the exit code of the child process */ + DWORD exit_code = 0; + GetExitCodeProcess (pi.hProcess, &exit_code); + /* Close process and thread handles */ CloseHandle (pi.hProcess); CloseHandle (pi.hThread); - return 0; + return exit_code; }