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

Martin Simmons vyslnqaaxytp at spammotel.com
Sat Sep 18 01:11:00 CEST 2004


>>>>> 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.

__Martin




More information about the MPlayer-dev-eng mailing list