Update of /cvsroot/freevo/kaa/base/src/notifier
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29600
Modified Files:
__init__.py thread.py
Log Message:
Collect zombies in kaa.shutdown(); make Thread exception handler handle
any exception, not just those derived from Exception.
Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/kaa/base/src/notifier/__init__.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** __init__.py 2 Aug 2005 02:59:07 -0000 1.23
--- __init__.py 2 Aug 2005 17:44:14 -0000 1.24
***************
*** 105,108 ****
--- 105,113 ----
# close them properly.
kill_processes()
+ # Collect any zombies
+ try:
+ os.waitpid(-1, os.WNOHANG)
+ except:
+ pass
Index: thread.py
===================================================================
RCS file: /cvsroot/freevo/kaa/base/src/notifier/thread.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** thread.py 1 Aug 2005 03:15:43 -0000 1.8
--- thread.py 2 Aug 2005 17:44:14 -0000 1.9
***************
*** 49,52 ****
--- 49,53 ----
# python imports
+ import sys
import os
import threading
***************
*** 133,141 ****
# call callback from main loop
self.result_cb(result)
! except Exception, e:
! log.exception('Thread crashed:')
if self.except_cb:
# call callback from main loop
! self.except_cb(e)
# remove ourself from main
MainThreadCallback(self.join)
--- 134,142 ----
# call callback from main loop
self.result_cb(result)
! except:
! log.exception('Thread raised exception:')
if self.except_cb:
# call callback from main loop
! self.except_cb(sys.exc_info()[1])
# remove ourself from main
MainThreadCallback(self.join)
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog