# prints messages to help developers debug the problem.
def _onexit():
global _daemons, _success, verbose
+ global _debug, _stop_before, _stop_after, _shell_before, _shell_after
if _daemons is None:
# In Python 2.5, if we exit as a side-effect of importing
# k5test, _onexit will execute in an empty global namespace.
# daemons have been launched and that we don't really need to
# amend the error message. The bug is fixed in Python 2.6.
return
+ if _debug or _stop_before or _stop_after or _shell_before or _shell_after:
+ # Wait before killing daemons in case one is being debugged.
+ sys.stdout.write('*** Press return to kill daemons and exit script: ')
+ sys.stdin.readline()
for proc in _daemons:
os.kill(proc.pid, signal.SIGTERM)
if not _success: