mirror of
https://github.com/janet-lang/janet
synced 2025-09-12 07:46:09 +00:00
Add status code to os.execute for windows.
This commit is contained in:
@@ -92,9 +92,11 @@ static int os_execute(DstArgs args) {
|
|||||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
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.hProcess);
|
||||||
CloseHandle(pi.hThread);
|
CloseHandle(pi.hThread);
|
||||||
DST_RETURN_INTEGER(args, 0);
|
DST_RETURN_INTEGER(args, (int32_t)status);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static int os_execute(DstArgs args) {
|
static int os_execute(DstArgs args) {
|
||||||
|
Reference in New Issue
Block a user