10000 Fix remove_signal_handler to not to crash after PyOS_FiniInterrupts by 1st1 · Pull Request #456 · python/asyncio · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Fix remove_signal_handler to not to crash after PyOS_FiniInterrupts #456

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Issue a warning in debug mode; return False when interpreter is final…
…izing
  • Loading branch information
1st1 committed Nov 7, 2016
commit 92f36ae82295fbf8d182d1e6f1338a51afd7f76b
6 changes: 5 additions & 1 deletion asyncio/unix_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ def remove_signal_handler(self, sig):
if self._interpreter_shutting_down:
# The interpreter is being shutdown. `PyOS_FiniInterrupts`
# was already called and it has restored all signals already.
return
if self._debug:
warnings.warn(
"the loop was not closed properly; call loop.close()",
ResourceWarning)
return False

self._check_signal(sig)
try:
Expand Down
0