57
57
env_changes=dict(BZR_SIGQUIT_PDB=None))
58
58
# wait for it to get started, and print the 'listening' line
59
59
proc.stdout.readline()
60
# another hit gives the default behaviour of terminating it
61
os.kill(proc.pid, signal.SIGQUIT)
62
# wait for it to go into pdb
64
os.kill(proc.pid, signal.SIGQUIT)
60
# break into the debugger
61
os.kill(proc.pid, signal.SIGQUIT)
62
# now send a second sigquit, which should cause it to exit. That
63
# won't happen until the original signal has been noticed by the
64
# child and it's run its signal handler. We don't know quite how long
65
# this will take, but if it's more than 10s then it's probably not
69
os.kill(proc.pid, signal.SIGQUIT)
70
# note: waitpid is different on win32, but this test only runs on
72
r = os.waitpid(proc.pid, os.WNOHANG)
74
# high bit says if core was dumped; we don't care
75
self.assertEquals(r[1] & 0x7f, signal.SIGQUIT)
78
self.fail("subprocess wasn't terminated by repeated SIGQUIT")
67
80
def test_breakin_disabled(self):
68
81
proc = self.start_bzr_subprocess(self._test_process_args,