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

jacopo mondi j.mondi at voltaelectronics.com
Fri Dec 2 10:52:29 CET 2011


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)
> 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
> 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...
> 4) The only really reliable method is to create a new process
>     group for MPlayer and then kill the process group instead
>     of just the process.
I'll give a look...

  Thank you both

      j
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users



More information about the MPlayer-users mailing list