def kill(self): if sublime.platform() == "windows": kill_process = subprocess.Popen(['C:\\Windows\\system32\\taskkill.exe', '/F', '/T', '/PID', str(self.pid)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) kill_process.communicate() else: os.killpg(self.pid, signal.SIGTERM) ProcessCache.remove(self)
def terminate(self): if self.is_alive(): self.process.terminate() ProcessCache.remove(self)