##// END OF EJS Templates
Merge pull request #2442 from minrk/signithalt...
Bussonnier Matthias -
r8497:974c2c0b merge
parent child Browse files
Show More
@@ -396,6 +396,8 b' class IPTester(object):'
396 396 """Run the stored commands"""
397 397 try:
398 398 retcode = self._run_cmd()
399 except KeyboardInterrupt:
400 return -signal.SIGINT
399 401 except:
400 402 import traceback
401 403 traceback.print_exc()
@@ -412,17 +414,22 b' class IPTester(object):'
412 414 continue # process is already dead
413 415
414 416 try:
415 print('Cleaning stale PID: %d' % subp.pid)
417 print('Cleaning up stale PID: %d' % subp.pid)
416 418 subp.kill()
417 419 except: # (OSError, WindowsError) ?
418 420 # This is just a best effort, if we fail or the process was
419 421 # really gone, ignore it.
420 422 pass
423 else:
424 for i in range(10):
425 if subp.poll() is None:
426 time.sleep(0.1)
427 else:
428 break
421 429
422 430 if subp.poll() is None:
423 431 # The process did not die...
424 print('... failed. Manual cleanup may be required.'
425 % subp.pid)
432 print('... failed. Manual cleanup may be required.')
426 433
427 434 def make_runners(inc_slow=False):
428 435 """Define the top-level packages that need to be tested.
@@ -535,6 +542,9 b' def run_iptestall(inc_slow=False):'
535 542 res = runner.run()
536 543 if res:
537 544 failed.append( (name, runner) )
545 if res == -signal.SIGINT:
546 print("Interrupted")
547 break
538 548 finally:
539 549 os.chdir(curdir)
540 550 t_end = time.time()
General Comments 0
You need to be logged in to leave comments. Login now