From: Brendan Hansen Date: Sun, 10 Dec 2023 16:15:40 +0000 (-0600) Subject: attempted fix: `FailedToRun` errors on Windows X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=ddbb7cd6d1c6ea3e64641b951f7eb1306bea0928;p=onyx.git attempted fix: `FailedToRun` errors on Windows --- diff --git a/runtime/src/ort_processes.h b/runtime/src/ort_processes.h index 8b1c6be2..a8c21162 100644 --- a/runtime/src/ort_processes.h +++ b/runtime/src/ort_processes.h @@ -284,15 +284,16 @@ ONYX_DEF(__process_wait, (WASM_I64), (WASM_I32)) { #ifdef _BH_WINDOWS DWORD exitCode; while (1) { - if (!WaitForSingleObject(process->proc_info.hProcess, INFINITE)) { - // HACK HACK HACK - DWORD error = GetLastError(); - if (error != 109 && error != 6) { - // printf("ERROR IN WAIT FOR SINGLE: %d\n", error); - results->data[0] = WASM_I32_VAL(1); - return NULL; - } - } + WaitForSingleObject(process->proc_info.hProcess, INFINITE)); + // if (!WaitForSingleObject(process->proc_info.hProcess, INFINITE)) { + // // HACK HACK HACK + // DWORD error = GetLastError(); + // if (error != 109 && error != 6) { + // // printf("ERROR IN WAIT FOR SINGLE: %d\n", error); + // results->data[0] = WASM_I32_VAL(1); + // return NULL; + // } + // } if (!GetExitCodeProcess(process->proc_info.hProcess, &exitCode)) { // HACK HACK HACK