rabin 7 năm trước cách đây
mục cha
commit
4e18cd32ac
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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()