attempted fix: `FailedToRun` errors on Windows
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 10 Dec 2023 16:15:40 +0000 (10:15 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 10 Dec 2023 16:15:40 +0000 (10:15 -0600)
runtime/src/ort_processes.h

index 8b1c6be261fa297ae778697cb6c20f6d3750ad3a..a8c2116297ef986bc654805cd6111261510d4fad 100644 (file)
@@ -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