Revert "Return error when exception was raised after main thread finishes" (#2524)
This reverts commit 71d43f3ca1.
This commit is contained in:
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"exit_code": 1
|
|
||||||
}
|
|
||||||
@ -921,12 +921,8 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
#if WASM_ENABLE_LIBC_WASI != 0
|
#if WASM_ENABLE_LIBC_WASI != 0
|
||||||
if (ret == 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);
|
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
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -554,12 +554,8 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
#if WASM_ENABLE_LIBC_WASI != 0
|
#if WASM_ENABLE_LIBC_WASI != 0
|
||||||
if (ret == 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);
|
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
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user