mirror of https://github.com/python/cpython
Issue #19850: asyncio: Set SA_RESTART when registering a signal handler to
limit EINTR occurrences.
This commit is contained in:
parent
0a956f1aec
commit
74e7cf3f46
|
@ -74,6 +74,8 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
|
|||
|
||||
try:
|
||||
signal.signal(sig, self._handle_signal)
|
||||
# Set SA_RESTART to limit EINTR occurrences.
|
||||
signal.siginterrupt(sig, False)
|
||||
except OSError as exc:
|
||||
del self._signal_handlers[sig]
|
||||
if not self._signal_handlers:
|
||||
|
|
Loading…
Reference in New Issue