[MPlayer-dev-eng] [PATCH] run command from osd menu

Attila Kinali attila at kinali.ch
Sat Sep 11 12:02:15 CEST 2004


On Fri, Sep 03, 2004 at 03:01:17AM +0200, Aurelien Jacobs wrote:
> On Thu, 2 Sep 2004 08:59:38 -0500
> Joey Parrish <joey at nicewarrior.org> wrote:
> 
> > On Thu, Sep 02, 2004 at 03:27:19PM +0000, Sascha Sommer wrote:
> > > On Friday 27 August 2004 11:37, Aurelien Jacobs wrote:
> > > > This patch allows to use the run command (from the osd menu
> > > > console) also from the menu config file, so that a menu entry
> > > > can call an external program.
> diff -Naur MPlayer-1.0pre5.orig/mplayer.c MPlayer-1.0pre5/mplayer.c
> --- MPlayer-1.0pre5.orig/mplayer.c	2004-09-01 17:15:36.000000000 +0200
> +++ MPlayer-1.0pre5/mplayer.c	2004-09-03 02:54:26.925388456 +0200
> @@ -3151,6 +3151,15 @@
>  	mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_PERCENT_POSITION=%ld\n", demuxer_get_percent_pos(demuxer));
>      } break;
>  
> +#if defined(HAVE_MENU) && !defined(__MINGW32__)
> +    case MP_CMD_CRUN : {
> +        if(!fork()) {

Why fork() ?
For me the "normal" behavior of executing an shell comand from a program
is, that it runs exec and blocks until the command finishes.

			Attila Kinali




More information about the MPlayer-dev-eng mailing list