예제 #1
0
파일: proxy.py 프로젝트: copton/lethe
    def die(self, stage):
        self._log("die: stage %d" % stage)
        if self.didQuit:
            return

        if stage == 0:
            self.childShallQuit = True
            self.internConnector.die()
            self.dispatcher.addWithTimeout(self.shutdownTimeout, self.die, 1)
        elif stage == 1:
            helper.kill(self.pid)
            self.dispatcher.addWithTimeout(self.killTimeout, self.die, 2)
        elif stage == 2:
            self._log("could not terminate simulation process (pid == %d)" % self.pid)
            self._quit()
예제 #2
0
파일: proxy.py 프로젝트: copton/lethe
 def shutdown(self):
     if not self.childDidQuit:
         helper.kill(self.pid)