Skip to content

WASI std: implement native os.exit and os.abort #2409

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

Merged
merged 3 commits into from
May 3, 2019

Conversation

shritesh
Copy link
Contributor

@shritesh shritesh commented May 2, 2019

No description provided.

@@ -211,6 +211,12 @@ pub fn abort() noreturn {
}
windows.ExitProcess(3);
},
Os.wasi => {
_ = wasi.proc_raise(wasi.SIGABRT);
// TODO: Is SIGKILL even necessary?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the code this is based on: https://git.musl-libc.org/cgit/musl/tree/src/exit/abort.c

I think this change is fine for now, and after #2380 WASI can go back to joining the other targets.

@andrewrk andrewrk merged commit 584dd28 into ziglang:master May 3, 2019
@shritesh shritesh deleted the wasi_native branch May 20, 2019 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants