-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add std::process::abort #37833
Add std::process::abort #37833
Conversation
Looks reasonable to me. I forget, did we decide that we'd only fcp to merge for stabilizations or also new APIs? I think it's the former? I'd be fine r+'ing if we did indeed conclude there's no need for fcp merge for all new unstable apis. |
Oh right, this'll also need a tracking issue before merging |
02dafa1
to
d8388a6
Compare
Tracking issue added. |
If this is doing the same thing as the std runtime is today then I'm fine landing, if not I'd like to understand the differences. |
Runtime aborts do use abort_internal as well. The only difference here is that we also run cleanups. Not sure if that's something we should do universally, but it definitely seems appropriate for std::process::abort. |
There's so many places where Rust calls |
Looking again at
I think that all of this is relatively dangerous, and optional, to be calling in a context where |
On Windows, |
This calls libc abort on Unix and fastfail on Windows.
d8388a6
to
fc0140d
Compare
Updated to no longer run cleanups. |
@bors: r+ |
📌 Commit fc0140d has been approved by |
Add std::process::abort This calls libc abort on Unix and fastfail on Windows, first running cleanups to do things like flush stdout buffers. This matches with libc abort's behavior, which flushes open files. r? @alexcrichton
This calls libc abort on Unix and fastfail on Windows, first running
cleanups to do things like flush stdout buffers. This matches with libc
abort's behavior, which flushes open files.
r? @alexcrichton