Previously the code assigns handler function pointer, which accepts one argument, to sigact.sa_sigaction, which accepts three argument. This mismatch is not allowed in Wasm.
I don't see the reason to use sa_sigaction here, so this change assigns to sa_handler, which accepts one argument, in Wasm.
Prefer
sa_handlertosa_sigactionin WasmPreviously the code assigns
handlerfunction pointer, which acceptsone argument, to
sigact.sa_sigaction, which accepts three argument.This mismatch is not allowed in Wasm.
I don't see the reason to use
sa_sigactionhere, so this changeassigns to
sa_handler, which accepts one argument, in Wasm.