tests/run-tests.py
changeset 32303 dc131b9772f2
parent 32302 8627cf4de929
child 32310 b96be0098624
equal deleted inserted replaced
32302:8627cf4de929 32303:dc131b9772f2
   521             print(m, end=' ')
   521             print(m, end=' ')
   522         print()
   522         print()
   523         sys.stdout.flush()
   523         sys.stdout.flush()
   524 
   524 
   525 def terminate(proc):
   525 def terminate(proc):
   526     """Terminate subprocess (with fallback for Python versions < 2.6)"""
   526     """Terminate subprocess"""
   527     vlog('# Terminating process %d' % proc.pid)
   527     vlog('# Terminating process %d' % proc.pid)
   528     try:
   528     try:
   529         getattr(proc, 'terminate', lambda : os.kill(proc.pid, signal.SIGTERM))()
   529         proc.terminate()
   530     except OSError:
   530     except OSError:
   531         pass
   531         pass
   532 
   532 
   533 def killdaemons(pidfile):
   533 def killdaemons(pidfile):
   534     import killdaemons as killmod
   534     import killdaemons as killmod