Author: dmeyer
Date: Fri Apr 21 12:16:20 2006
New Revision: 1431

Modified:
   trunk/base/src/notifier/popen.py

Log:
prevent recursion

Modified: trunk/base/src/notifier/popen.py
==============================================================================
--- trunk/base/src/notifier/popen.py    (original)
+++ trunk/base/src/notifier/popen.py    Fri Apr 21 12:16:20 2006
@@ -402,7 +402,7 @@
         log.info('new process watcher instance')
         self.__processes = {}
         self.__timer = None
-
+        self.status = 'running'
 
     def append( self, proc, cb ):
         self.__processes[ proc ] = cb
@@ -456,11 +456,22 @@
 
 
     def stopall( self ):
+        if self.status != 'running':
+            return
         # stop all childs without waiting
         for p in self.__processes.keys():
             p.stop()
+        self.status = 'stopping'
 
+        
     def killall( self ):
+        # prevent recursion
+        if not self.status in ('running', 'stopping'):
+            return
+        # make sure every child is stopped
+        self.stopall()
+        self.status = 'stopped'
+        
         # now wait until all childs are dead
         while self.__processes:
             self.check()


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to