I see this when I press Ctrl-C to exit the application
Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/usr/lib/python2.6/multiprocessing/util.py", line 269, in _exit_function p.join() File "/usr/lib/python2.6/multiprocessing/process.py", line 119, in join res = self._popen.wait(timeout) File "/usr/lib/python2.6/multiprocessing/forking.py", line 117, in wait return self.poll(0) File "/usr/lib/python2.6/multiprocessing/forking.py", line 106, in poll pid, sts = os.waitpid(self.pid, flag) OSError: [Errno 4] Interrupted system call Error in sys.exitfunc: Traceback (most recent call last): File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/usr/lib/python2.6/multiprocessing/util.py", line 269, in _exit_function p.join() File "/usr/lib/python2.6/multiprocessing/process.py", line 119, in join res = self._popen.wait(timeout) File "/usr/lib/python2.6/multiprocessing/forking.py", line 117, in wait return self.poll(0) File "/usr/lib/python2.6/multiprocessing/forking.py", line 106, in poll pid, sts = os.waitpid(self.pid, flag) OSError: [Errno 4] Interrupted system call
I use twisted on top of my own things,
I registered a Ctrl-C signal with the following code
def sigHandler(self, arg1, arg2): if not self.backuped: self.stopAll() else: out('central', 'backuped ALREADY, now FORCE exiting') exit() def stopAll(self): self.parserM.shutdown() for each in self.crawlM: each.shutdown() self.backup() reactor.stop()
and when they signal to others the completion of work, he tries to tell them to stop working through
exit = multiprocessing.Event() def shutdown(self): self.exit.set()
where are all my processes in one form or another,
def run(self): while not self.exit.is_set(): do something out('crawler', 'crawler exited sucessfully')
Any idea what the error is? I only get it when I have multiple instances of a specific thread.