[MPlayer-users] double mplayer instance when playing HTTP streams

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Dec 3 08:42:51 CET 2011


On Fri, Dec 02, 2011 at 10:52:29AM +0100, jacopo mondi wrote:
> On 12/01/2011 07:55 PM, Reimar Döffinger wrote:
> >On Thu, Dec 01, 2011 at 05:36:50PM +0100, jacopo mondi wrote:
> >>Hi there,
> >>     I'm using mplayer in slave mode, and controlling it by mean of a
> >>custom web browser plugin.
> >>When playing HTTP streams, I always found two mplayer instances
> >>running. One is launched by myself, the other shows up after the
> >>'loadfile' command is issued to mplayer stdin.
> >>
> >>When I have to shutdown the plugin the child remains alive, since I
> >>only know the father's pid.
> >>Why does mplayer forks to player HTTP stream? Is there any way to
> >>terminate both the processes?
> >Besides the mentioned recommended of using the quit command
> >1) Killing a process with SIGKILL without even giving it a chance
> >    to quit properly (e.g. by sending SIGTERM first) is a bad
> >    idea in all cases.
> I send the quit command, then I terminate the PID (just in case it's
> still alive)

And how long do you wait in-between?

> >2) Tools like ps can figure out all child processes, so I am
> >    sure there's some way you could, too.
> I know, but the plugin is supposed to run without external intervention

So? I meant you obviously can just copy-past the code ps/pstree uses to
find child processes.
But this is not reliable anyway.

> >3) I have a patch (see mplayer-dev-eng) that makes it quite if
> >    the parent disappeared and I'll apply it shortly.
> If it's possible we prefer to use mplayer version already present in
> our distribution's repositories...

Then get the distributions to update and/or apply that patch.


More information about the MPlayer-users mailing list