[asterisk-dev] tilghman: trunk r301403 - in /trunk: ./ main/file.c

Tony Mountifield tony at softins.co.uk
Wed Jan 12 10:41:03 CST 2011


In article <E1PcoYo-0003Ef-CQ at wibble.digium.internal>,
SVN commits to the Digium repositories <svn-commits at lists.digium.com> wrote:
>  	if (f->realfilename && f->filename) {
> -			size = strlen(f->filename) + strlen(f->realfilename) + 15;
> -			cmd = alloca(size);
> -			memset(cmd,0,size);
> -			snprintf(cmd, size, "/bin/mv -f \"%s\" \"%s\"", f->filename, f->realfilename);
> -			ast_safe_system(cmd);
> +		if (ast_safe_fork(0) == 0) {
> +			execl("/bin/mv", "mv", "-f", f->filename, f->realfilename, SENTINEL);
> +		}

Is the zombie child process reaped somewhere else?

Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list