[Python-checkins] cpython: Issue #19850: asyncio: Set SA_RESTART when registering a signal handler to
charles-francois.natali
python-checkins at python.org
Thu Dec 5 22:54:05 CET 2013
http://hg.python.org/cpython/rev/546cad3627e2
changeset: 87781:546cad3627e2
user: Charles-François Natali <cf.natali at gmail.com>
date: Thu Dec 05 22:47:19 2013 +0100
summary:
Issue #19850: asyncio: Set SA_RESTART when registering a signal handler to
limit EINTR occurrences.
files:
Lib/asyncio/unix_events.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -74,6 +74,8 @@
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:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list