rabin 7 years ago
parent
commit
4e18cd32ac
1 changed files with 2 additions and 0 deletions
  1. 2 0
      core.py

+ 2 - 0
core.py

@@ -7,6 +7,7 @@
 """
 import time
 import os
+import signal
 import re
 import sys
 import getopt
@@ -307,6 +308,7 @@ class Shell(object):
 			while time.time() < deadline and proc.poll() == None:
 				time.sleep(poll_seconds)
 			if proc.poll() == None:
+				os.killpg(proc.pid, signal.SIGTERM)
 				return 'timeout'
 
 			stdout,stderr = proc.communicate()