On Monday 31 December 2007 12:36, Thorsten Pferdekämper wrote:
> Hi,
>
> I just wondered why channel switching needs so long on my box and why it is
> always accompagnied by a "PANIC can't kill program" message in main-0.log.
> Here is what I believe why this is:
>
> Basically, the problem is that os.waitpid and subprocess.Popen.poll do not
> really work together. It seems that only one of them can be used, but not
> both.
>
[...]

Hi,
I have now changed ChildApp.wait() in childapp.py the following way:

Old:
   def wait(self):
        """
        wait for the child process to stop
        returns the (pid, status) tuple
        """
        #self.child.wait()
        #self.status = self.child.returncode
        #return (self.child.pid, self.status)
        # this is the wait in ChildApp2
        
        try:
            pid, status = os.waitpid(self.child.pid, os.WNOHANG)
        except OSError:
            # strange, no child? So it is finished
            return True

        if pid == self.child.pid:
            self.status = self.child.returncode
            return True
        return False

New:
    def wait(self):
        """
        wait for the child process to stop
        returns the (pid, status) tuple
        """
        returncode = self.child.poll()
        if returncode is None:
            return False
        else:
            self.status = returncode
            return True

At least, this works for me and I believe that this should also work for 
others.

Regards,
        Thorsten

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to