autotest: try harder to kill child processes

This commit is contained in:
Andrew Tridgell 2011-11-09 17:44:14 +11:00
parent c158cb8e63
commit e0cb4507ec
1 changed files with 7 additions and 2 deletions

View File

@ -73,19 +73,24 @@ def pexpect_autoclose(p):
def pexpect_close(p):
'''close a pexpect child'''
global close_list
p.close()
time.sleep(1)
p.close(force=True)
close_list.remove(p)
if p in close_list:
close_list.remove(p)
def pexpect_close_all():
'''close all pexpect children'''
global close_list
for p in close_list[:]:
try:
p.close()
time.sleep(1)
p.close(Force=True)
except Exception:
pass
def start_SIL(atype, valgrind=True, wipe=False, CLI=False):
def start_SIL(atype, valgrind=False, wipe=False, CLI=False):
'''launch a SIL instance'''
cmd=""
if valgrind and os.path.exists('/usr/bin/valgrind'):