mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +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
20
Lib/test/test_eintr.py
Normal file
20
Lib/test/test_eintr.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import os
|
||||
import signal
|
||||
import unittest
|
||||
|
||||
from test import script_helper, support
|
||||
|
||||
|
||||
@unittest.skipUnless(os.name == "posix", "only supported on Unix")
|
||||
class EINTRTests(unittest.TestCase):
|
||||
|
||||
@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
|
||||
def test_all(self):
|
||||
# Run the tester in a sub-process, to make sure there is only one
|
||||
# thread (for reliable signal delivery).
|
||||
tester = support.findfile("eintr_tester.py", subdir="eintrdata")
|
||||
script_helper.assert_python_ok(tester)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue