summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index 23987c7..5450130 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -864,6 +864,21 @@ class SubprocessMixin:
self.loop.run_until_complete(main())
+ @unittest.skipIf(sys.platform != 'linux', "Linux only")
+ def test_subprocess_send_signal_race(self):
+ # See https://github.com/python/cpython/issues/87744
+ async def main():
+ for _ in range(10):
+ proc = await asyncio.create_subprocess_exec('sleep', '0.1')
+ await asyncio.sleep(0.1)
+ try:
+ proc.send_signal(signal.SIGUSR1)
+ except ProcessLookupError:
+ pass
+ self.assertNotEqual(await proc.wait(), 255)
+
+ self.loop.run_until_complete(main())
+
if sys.platform != 'win32':
# Unix