[MPlayer-dev-eng] [PATCH] make cache process exit when parent died

Erik Auerswald auerswal at unix-ag.uni-kl.de
Sun Nov 27 20:06:27 CET 2011


Hello Reimar,

On 11/27/2011 05:37 PM, Reimar Döffinger wrote:
> a few people (including me) have been quite annoyed with MPlayer leaving its
> cache process around if it crashes in a way the signal handler cannot
> handle.

One could do without the occasional mplayer cache process left behind. ;-)

> Attached is a patch that makes the cache process check its parent
> process ID, and if it changed it terminates itself, assuming the
> main process somehow was terminated.

The feature worked as advertised in my testing (sending SIGKILL to the 
main process).

> There is a small race condition which might cause the error message to
> be printed even when MPlayer exits normally, but I think that's OK
> and better than never printing anything.

Printing a message when something went wrong seems more important than 
never printing it when exiting normally.

Regards,
Erik


More information about the MPlayer-dev-eng mailing list