Repository navigation
gh-87079: Warn on unintended signal wakeup fd override in asyncio
#96807
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
Changes from all commits
bec6ccd
7badd94
60bd836
bc7b849
3b4975a
428cb7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,2 @@ | ||||||||
| Warn the user whenever asyncio event loops override a signal wake up file | ||||||||
| descriptor that was previously set. | ||||||||
|
Comment on lines
+1
to
+2
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well dang I missed this comment and merged without applying that. Sorry about that (I fail at scrolling). I think this isn't so important that we need to send another PR, but if you insist I'll gladly merge it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No worries, it was just a minor suggestion. |
||||||||
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.
Otherwise, an active signal wakeup file descriptor may be scrapped too early.
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.
At the very least this deserves to be a comment in the source code. IIUC
super().close()isselector_events.BaseSelectorEventLoop.close(), which closes the socketpair, and that would break the check you've added toremove_signal_handler(). But I'm not sure I like that check, see below.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.
Comment added in 3b4975a.