From: Johannes Schindelin Date: Sun, 14 Oct 2007 03:07:18 GMT Subject: Re: [PATCH 14/14] Use the asyncronous function infrastructure to run the content filter. Message-ID: In-Reply-To: <1192305984-22594-15-git-send-email-johannes.sixt@telecom.at> Hi, On Sat, 13 Oct 2007, Johannes Sixt wrote: > status = finish_command(&child_process); > if (status) > - error("external filter %s failed %d", cmd, -status); > + error("external filter %s failed", params->cmd); Did you mean to remove the status from the output (it should probably read "(exit status %d)" instead of just "%d", but an exit status can help identify problems, right? > - child_process.pid = fork(); > - if (child_process.pid < 0) { > - error("cannot fork to run external filter %s", cmd); > - close(pipe_feed[0]); > - close(pipe_feed[1]); > - return NULL; > - } > - if (!child_process.pid) { > - close(pipe_feed[0]); > - exit(filter_buffer(pipe_feed[1], src, *sizep, cmd)); > - } > - close(pipe_feed[1]); > + if (start_async(&async)) > + return 0; /* error was already reported */ Please write "return NULL;" Thanks, Dscho