def kill(self, pid=None):
if self.running:
pid = self._pid if pid is None else pid
if pid_exists(pid):
log.debug("killing process with pid %s" % pid)
process = Process(pid)
self._out_stream.stop()
self._error_stream.stop()
for proc in process.children(recursive=True):
proc.kill()
process.kill()
评论列表
文章目录