-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emulate <signal.h> #183
Emulate <signal.h> #183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good place to start. Not sure how I feel about raise(SIGABRT) either, but clearly most of this should be deleted. We can look into adding the very limited functionality we do support in follow-up PR.
wasm doesn't support signals, so provide an emulation layer, enabled with -D_WASI_EMULATED_SIGNAL and -lwasi-emulated-signal.
I ended up rewriting this PR to implement an emulation layer instead of just removing everything, so this PR now supports I have some tests that I'll submit to wasi-sdk's testsuite separately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
simd-2.C now compiles thanks to: WebAssembly/wasi-libc#183 Differential Revision: https://reviews.llvm.org/D80930
simd-2.C now compiles thanks to: WebAssembly/wasi-libc#183 Differential Revision: https://reviews.llvm.org/D80930
wasm doesn't support signals, so therefore wasi-libc doesn't support signals.
But we can emulate them, at least for the synchronous
raise
case. This PR now implements basic signal emulation.[edited to reflect the new content of the PR]