-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
rt::atexit callbacks don't run after exit(0) call #28065
Comments
I... thought we had an issue for this and did this previously, not sure what happened here! |
To quote the source code // FIXME: switch this to use atexit. Currently this
// segfaults (the queue's memory is mysteriously gone), so
// instead the cleanup is tied to the `std::rt` entry point. The only way that |
Hm, I had forgotten about that comment. Regardless though there is no reason that this should fundamentally not be able to use |
The way the CRT on Windows handles |
Hm, you know I had a feeling the test I added in #28069 would fail on Windows for a reason like that, I think we'll have to do something like that on Windows (call |
This adds a call to `rt::cleanup` on `process::exit` to make sure we clean up after ourselves on the way out from Rust. Closes rust-lang#28065
This adds a call to `rt::cleanup` on `process::exit` to make sure we clean up after ourselves on the way out from Rust. Closes #28065
Specifically, the stdout buffer doesn't flush: from #28058:
We should probably just be using libc atexit here.
cc @alexcrichton
The text was updated successfully, but these errors were encountered: