# Let the interpreter startup before we send signals. See #3137.
while count < max and proc.poll() is None:
+ # Forcefully kill the process if we weren't able to signal it.
+ os.kill(proc.pid, signal.SIGINT)
self.fail("Subprocess didn't finish initialization")
# proc.send_signal(event) could also be done here.