[MPlayer-dev-eng] [PATCH] watchpid slave command

Jason Tackaberry tack at urandom.ca
Wed Aug 12 22:04:12 CEST 2009


On Wed, 2009-08-12 at 18:39 +0200, Nicolas George wrote:
> If your plumbing is done correctly, whenever your frontend crashed, mplayer
> should get an EOF condition on the slave fd: the best option is to make
> mplayer (optionally) exit on EOF from input fds. After a quick glance at the
> input code, I think this would require much less code than your patch.

I haven't had much time to investigate the issue, but I've noticed that
MPlayer sometimes leaves useless (not zombies, technically) processes
lying around.  Starting mplayer seems to create two processes, and if I
kill -9 my front-end, one of the processes dies properly, but the other
lives on.

This is reproducible even without a front-end.

Let's say I:

        tack at viper:~$ mplayer foo.avi

Then, while foo.avi runs:

        tack at viper:~$ ps auxww|grep mplayer
        tack     18792  5.7  1.4  55824 26988 pts/21   S+   16:00   0:00 mplayer foo.avi
        tack     18793  0.0  1.1  49120 20840 pts/21   S+   16:00   0:00 mplayer foo.avi
        tack at viper:~$ kill -9 18792

At this point, the terminal running MPlayer outputs "Killed", but
notice:

        tack at viper:~$ ps auxww|grep mplayer
        tack     18793  0.0  1.1  49120 20840 pts/21   S    16:00   0:00 mplayer foo.avi
        
If I strace the process, it's repeating:

        nanosleep({0, 50000000}, NULL)          = 0
        gettimeofday({1250107360, 513301}, NULL) = 0
        gettimeofday({1250107360, 513321}, NULL) = 0

I never bothered to look into it more than that, since it's not itchy
enough.  Maybe someone has a simple answer.

Cheers,
Jason.




More information about the MPlayer-dev-eng mailing list