Move also the "ready" trigger after the installation of the signal handler and
the call to siginterrupt().
Use a timeout of 5 seconds instead of 3. Two seconds are supposed to be enough,
but some of our buildbots are really slow (especially the FreeBSD 6 VM).
# wait until the child process is loaded and has started
first_line = process.stdout.readline()
- stdout, stderr = process.communicate(timeout=3.0)
- # Wait the process with a timeout of 5 seconds
- timeout = time.time() + 5.0
- while True:
- if timeout < time.time():
- raise Timeout()
- status = process.poll()
- if status is not None:
- break
- time.sleep(0.1)
-
- stdout, stderr = process.communicate()
- except Timeout:
++ stdout, stderr = process.communicate(timeout=5.0)
+ except subprocess.TimeoutExpired:
process.kill()
return False
else: