8000 Remove signal · python/cpython@39d8403 · GitHub
[go: up one dir, main page]

Skip to content

Commit 39d8403

Browse files
committed
Remove signal
1 parent 0388a23 commit 39d8403

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3309,19 +3309,12 @@ def run(addr, authkey):
33093309
client = self.connection.Client(addr, authkey=authkey)
33103310
client.send(1729)
33113311

3312-
timeout_in_s = 2
33133312
key = b""
33143313

3315-
try:
3316-
# wait 2s so the test won't hang forever in case of regression
3317-
signal.signal(signal.SIGALRM, handler)
3318-
signal.alarm(timeout_in_s)
3319-
with self.connection.Listener(authkey=key) as listener:
3320-
threading.Thread(target=run, args=(listener.address, key)).start()
3321-
with listener.accept() as d:
3322-
self.assertEqual(d.recv(), 1729)
3323-
finally:
3324-
signal.alarm(0)
3314+
with self.connection.Listener(authkey=key) as listener:
3315+
threading.Thread(target=run, args=(listener.address, key)).start()
3316+
with listener.accept() as d:
3317+
self.assertEqual(d.recv(), 1729)
33253318

33263319
if self.TYPE == 'processes':
33273320
self.assertRaises(OSError, listener.accept)

0 commit comments

Comments
 (0)
0