Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv3104

Modified Files:
        childapp.py 
Log Message:
store return value for ChildApp2

Index: childapp.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/childapp.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** childapp.py 13 Dec 2003 14:34:43 -0000      1.48
--- childapp.py 12 Jan 2004 19:52:46 -0000      1.49
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.49  2004/01/12 19:52:46  dischi
+ # store return value for ChildApp2
+ #
  # Revision 1.48  2003/12/13 14:34:43  outlyer
  # Make this clear; we are using stop_osd to figure out if we're playing
***************
*** 244,248 ****
          return self.t1.isAlive() or self.t2.isAlive()
  
!     
      def kill(self, signal=15):
          global __all_childapps__
--- 247,255 ----
          return self.t1.isAlive() or self.t2.isAlive()
  
! 
!     def wait(self):
!         return util.popen3.waitpid(self.child.pid)
! 
!         
      def kill(self, signal=15):
          global __all_childapps__
***************
*** 266,270 ****
          self.lock.acquire()
          # maybe child is dead and only waiting?
!         if util.popen3.waitpid(self.child.pid):
              _debug_('done the easy way', 2)
              self.child = None
--- 273,277 ----
          self.lock.acquire()
          # maybe child is dead and only waiting?
!         if self.wait():
              _debug_('done the easy way', 2)
              self.child = None
***************
*** 283,287 ****
          _debug_('childapp: Before wait(%s)' % self.child.pid)
          for i in range(20):
!             if util.popen3.waitpid(self.child.pid):
                  break
              time.sleep(0.1)
--- 290,294 ----
          _debug_('childapp: Before wait(%s)' % self.child.pid)
          for i in range(20):
!             if self.wait():
                  break
              time.sleep(0.1)
***************
*** 293,297 ****
                  pass
              for i in range(20):
!                 if util.popen3.waitpid(self.child.pid):
                      break
                  time.sleep(0.1)
--- 300,304 ----
                  pass
              for i in range(20):
!                 if self.wait():
                      break
                  time.sleep(0.1)
***************
*** 571,574 ****
--- 578,584 ----
              rc.post_event(Event(PLAY_START, arg=self.item))
  
+         # return status of the child
+         self.status = 0
+         
          # start the child
          ChildApp.__init__(self, app, debugname, doeslogging)
***************
*** 579,582 ****
--- 589,600 ----
  
  
+     def wait(self):
+         pid, status = os.waitpid(self.child.pid, os.WNOHANG)
+         if pid == self.child.pid:
+             self.status = status
+             return True
+         return False
+     
+         
      def stop(self, cmd=''):
          try:




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to