-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix for operation on closed file in faulthandler teardown #11584
Fix for operation on closed file in faulthandler teardown #11584
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 change 👍 .
I think we should simplify a bit by combining fault_handler_original_stderr_fd_key
and fault_handler_originally_enabled_key
; specifically, scrape fault_handler_originally_enabled_key
and use fault_handler_original_stderr_fd_key
to see if faulthandler was enabled before or not.
Also agree with @RonnyPfannschmidt that a comment explaining that, in case the faulthandler is already enabled, the faulthandler api doesn't provide a way to get the FD that was previously passed to enable()
, so we assume it was the default (stderr).
Can this PR be merged? Or is there more specific changes needed? Thanks. |
@bnomis There are some unresolved comments above - add a comment and combine the keys (see my comment above), address the coverage issue mentioned by @nicoddemus. |
@bluetech thank you for your comments. I have updated the PR. |
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.
Thanks @bnomis!
Closes #11572
remember stderr fileno in config.stash to be restored on faulthandler teardown