Quellcode durchsuchen

Revert "Return error when exception was raised after main thread finishes" (#2524)

This reverts commit 71d43f3ca18b96c983d0fa8ca45ea658d6f9ee4a.
YAMAMOTO Takashi vor 2 Jahren
Ursprung
Commit
9e3904337e

+ 0 - 3
core/iwasm/libraries/lib-wasi-threads/test/trap_after_main_thread_finishes.json

@@ -1,3 +0,0 @@
-{
-  "exit_code": 1
-}

+ 1 - 5
product-mini/platforms/posix/main.c

@@ -921,12 +921,8 @@ main(int argc, char *argv[])
 
 #if WASM_ENABLE_LIBC_WASI != 0
     if (ret == 0) {
-        /* wait for threads to finish and propagate wasi exit code. */
+        /* propagate wasi exit code. */
         ret = wasm_runtime_get_wasi_exit_code(wasm_module_inst);
-        if (wasm_runtime_get_exception(wasm_module_inst)) {
-            /* got an exception in spawned thread */
-            ret = 1;
-        }
     }
 #endif
 

+ 1 - 5
product-mini/platforms/windows/main.c

@@ -554,12 +554,8 @@ main(int argc, char *argv[])
 
 #if WASM_ENABLE_LIBC_WASI != 0
     if (ret == 0) {
-        /* wait for threads to finish and propagate wasi exit code. */
+        /* propagate wasi exit code. */
         ret = wasm_runtime_get_wasi_exit_code(wasm_module_inst);
-        if (wasm_runtime_get_exception(wasm_module_inst)) {
-            /* got an exception in spawned thread */
-            ret = 1;
-        }
     }
 #endif