: [MPlayer-dev-eng] [PATCH] handle sigchld in mplayer.c

Sascha Sommer saschasommer at freenet.de
Sun Sep 19 22:48:30 CEST 2004


On Friday 17 September 2004 23:11, Martin Simmons wrote:
> >>>>> On Fri, 17 Sep 2004 23:09:29 +0000, Sascha Sommer
> >>>>> <saschasommer at freenet.de> said:
> >
> > As pointed out the run command from the menu patch leaves zombies for the
> > expired child processes until MPlayer exits. This patch hopefully fixes
> > it by handling SIGCHLD.
> > Ok, to apply?
> >
> > +static void child_sighandler(int x){
> > +  pid_t pid;
> > +  while((pid=waitpid(-1,NULL,WNOHANG)) >
> > 0)mp_msg(MSGT_CPLAYER,MSGL_V,"child %d left\n",pid); +}
>
> I suspect it is unsafe to call mp_msg() from an async signal handler.
>

Commited without the mp_msg.

Sascha




More information about the MPlayer-dev-eng mailing list