зеркало из https://github.com/mozilla/pjs.git
Bug 475455 - [Windows 2000] runtests.py: automation.py can't kill ssltunnel.exe; (Av1b) Support Win2K kill.exe tool; r=jwalden+bmo
This commit is contained in:
Родитель
7bd5473b8d
Коммит
06f1824fb1
|
@ -113,8 +113,17 @@ class Process(subprocess.Popen):
|
|||
|
||||
def kill(self):
|
||||
if IS_WIN32:
|
||||
import platform
|
||||
pid = "%i" % self.pid
|
||||
subprocess.Popen(["taskkill", "/F", "/PID", pid]).wait()
|
||||
if platform.release() == "2000":
|
||||
# Windows 2000 needs 'kill.exe' from the 'Windows 2000 Resource Kit tools'. (See bug 475455.)
|
||||
try:
|
||||
subprocess.Popen(["kill", "-f", pid]).wait()
|
||||
except:
|
||||
log.info("ERROR FAIL Missing 'kill' utility to kill process with pid=%s. Kill it manually !", pid)
|
||||
else:
|
||||
# Windows XP and later.
|
||||
subprocess.Popen(["taskkill", "/F", "/PID", pid]).wait()
|
||||
else:
|
||||
os.kill(self.pid, signal.SIGKILL)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче