mirror of
https://github.com/janet-lang/janet
synced 2025-03-08 09:18:10 +00:00
Add status code to os.execute for windows.
This commit is contained in:
parent
f63d08efbd
commit
579bfe97df
@ -91,10 +91,12 @@ static int os_execute(DstArgs args) {
|
||||
// Wait until child process exits.
|
||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
||||
|
||||
// Close process and thread handles.
|
||||
// Close process and thread handles.
|
||||
WORD status;
|
||||
GetExitCodeProcess(pi.hProcess, &status);
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
DST_RETURN_INTEGER(args, 0);
|
||||
DST_RETURN_INTEGER(args, (int32_t)status);
|
||||
}
|
||||
#else
|
||||
static int os_execute(DstArgs args) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user