Skip to content

Commit

Permalink
Revert "Return error when exception was raised after main thread fini…
Browse files Browse the repository at this point in the history
…shes (bytecodealliance#2169)"

This reverts commit 71d43f3.

for some reasons, the original commit assumes a trap should win over exit
even if the former is 1 second later. i don't see any reason it should.
  • Loading branch information
yamt committed Aug 31, 2023
1 parent 455061a commit c38eadf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.

This file was deleted.

6 changes: 1 addition & 5 deletions product-mini/platforms/posix/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 1 addition & 5 deletions product-mini/platforms/windows/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c38eadf

Please sign in to comment.