Hey everyone I am seeing this when I press Ctrl-C to exit my app
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 am using twisted on top of my own stuff,
I registered the signal Ctrl-C 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 others to shutdown, it tries to tell them to shutdown nicely through
exit = multiprocessing.Event()
def shutdown(self):
self.exit.set()
where all my processes are in some form,
def run(self):
while not self.exit.is_set():
do something
out('crawler', 'crawler exited sucessfully')
Any idea what this error is? I only get it when I have more than one instance of a particular thread.