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

Diego Biurrun diego at biurrun.de
Wed Aug 12 19:23:20 CEST 2009


On Wed, Aug 12, 2009 at 06:08:43PM +0200, rototor at rototor.de wrote:
> 
> attached you find a patch which adds a new slave command "watchpid". The command has the syntax:

Just a few comments..

> --- DOCS/tech/slave.txt	(Revision 29485)
> +++ DOCS/tech/slave.txt	(Arbeitskopie)
> @@ -446,7 +446,10 @@
>  volume <value> [abs]
>      Increase/decrease volume or set it to <value> if [abs] is nonzero.
>  
> -
> +watchpid <pid>

The empty line was there on purpose.

> +	Periodicly check if the process with the given pid does still exist. If not, then

periodicALLy, long line

> +	exit mplayer. The process may have crashed or something similar.

MPlayer

> @@ -463,7 +466,6 @@
>      Run <value> as shell command. In OSD menu console mode stdout and stdin
>      are through the video output driver.
>  
> -
>  Available properties:

stray bad change

> --- mplayer.c	(Revision 29485)
> +++ mplayer.c	(Arbeitskopie)
> @@ -731,6 +732,40 @@
>  
> +static int watched_process_gone()

void, same below

> +	/* If we dont watch -- then nothing can be gone */

do not

> +	if( pid_to_watch == 0 )

if (!pid_to_watch), same below

> +	if( kill(pid_to_watch,0) != 0 )

if (kill(pid_to_watch, 0))


Get rid of the tabs and the trailing whitespace.

Diego



More information about the MPlayer-dev-eng mailing list