def t5(pretty, factory):
pipe = Pipe()
p = P2(pipe)
p.start()
factory.processes.append(p)
gc_pid = pipe.get()
try:
proc = psutil.Process(gc_pid)
except Exception, e:
print('FAIL %s: could not query grandchild: %s' % (pretty, e))
return False
os.kill(p.pid, signal.SIGKILL)
ok = False
for i in range(3):
try:
proc = psutil.Process(gc_pid)
except psutil.NoSuchProcess:
ok = True
break
time.sleep(0.5)
if not ok:
print('FAIL %s: could query grandchild: %s' % (pretty, proc))
return False
return True
# grandchild does not die when child dies if PDEATHSIG is unset?
评论列表
文章目录