mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Issue #23285: PEP 475 -- Retry system calls failing with EINTR.
This commit is contained in:
parent
d005090e01
commit
6e6c59b508
18 changed files with 753 additions and 522 deletions
|
@ -587,7 +587,7 @@ class SiginterruptTest(unittest.TestCase):
|
|||
r, w = os.pipe()
|
||||
|
||||
def handler(signum, frame):
|
||||
pass
|
||||
1 / 0
|
||||
|
||||
signal.signal(signal.SIGALRM, handler)
|
||||
if interrupt is not None:
|
||||
|
@ -604,9 +604,8 @@ class SiginterruptTest(unittest.TestCase):
|
|||
try:
|
||||
# blocking call: read from a pipe without data
|
||||
os.read(r, 1)
|
||||
except OSError as err:
|
||||
if err.errno != errno.EINTR:
|
||||
raise
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
else:
|
||||
sys.exit(2)
|
||||
sys.exit(3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue