diff -r 10ecf8576eb2 Lib/test/test_signal.py --- a/Lib/test/test_signal.py Tue Jun 21 17:24:21 2011 +0200 +++ b/Lib/test/test_signal.py Tue Jun 21 23:08:14 2011 +0200 @@ -337,23 +337,21 @@ if interrupt is not None: signal.siginterrupt(signal.SIGALRM, interrupt) - # run the test twice - for loop in range(2): - # send a SIGALRM in a second (during the read) - signal.alarm(1) - try: - # blocking call: read from a pipe without data - os.read(r, 1) - except OSError as err: - if err.errno != errno.EINTR: - raise - else: - sys.exit(2) + # send a SIGALRM in a second (during the read) + signal.alarm(1) + try: + # blocking call: read from a pipe without data + os.read(r, 1) + except OSError as err: + if err.errno != errno.EINTR: + raise + else: + sys.exit(2) sys.exit(3) """ % (interrupt,) - with spawn_python('-c', code) as process: + with spawn_python('-c', code, close_fds=False) as process: try: - stdout, stderr = process.communicate(timeout=3.0) + stdout, stderr = process.communicate(timeout=4.0) except subprocess.TimeoutExpired: process.kill() return False