diff options
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r-- | Lib/asyncio/unix_events.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index dd57fe8e79..f4cf6e7f2a 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -48,6 +48,11 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop): def _socketpair(self): return socket.socketpair() + def close(self): + for sig in list(self._signal_handlers): + self.remove_signal_handler(sig) + super().close() + def add_signal_handler(self, sig, callback, *args): """Add a handler for a signal. UNIX only. |