[mythtv-commits] mythtv commit: r25977 by beirdo

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Sun Aug 29 23:59:23 UTC 2010

      Author: beirdo
        Date: 2010-08-29 23:59:23 +0000 (Sun, 29 Aug 2010)
New Revision: 25977
   Changeset: http://svn.mythtv.org/trac/changeset/25977


Changed myth_system to use a reaper thread.  This takes care of the possibility
of several concurrent children exiting at the same time.  

The MythSystemReaper thread is started the first time is is to be used, and
uses a QMap of PID -> { mutex, return value } to match up the dying child 
(from waitpid(-1, &status, WNOHANG)) to the appropriate mutex which is blocking
the calling thread.  There is a 100ms timeout between calls to waitpid, causing
the blocking to be in the timeout, not in waitpid() itself as an old workaround
indicated that OSX has potential issues with blocking in waitpid.

Also, in the child process, after the fork, clear the verbose mutex if it is 
locked, as this will cause the child process to freeze should it try to use

This *should* fix the bug where starting a recording gets stuck at "Please 
Wait..." waiting for the pulseaudio disabling to return.  myth_system() is
now thread-safe.



More information about the mythtv-commits mailing list