return 1;
}
-static int filter_buffer(const char *path, const char *src,
+static int filter_buffer(int fd, const char *src,
unsigned long size, const char *cmd)
{
/*
memset(&child_process, 0, sizeof(child_process));
child_process.argv = argv;
child_process.in = -1;
+ child_process.out = fd;
if (start_command(&child_process))
return error("cannot fork to run external filter %s", cmd);
return 0;
}
if (!child_process.pid) {
- dup2(pipe_feed[1], 1);
close(pipe_feed[0]);
- close(pipe_feed[1]);
- exit(filter_buffer(path, src, len, cmd));
+ exit(filter_buffer(pipe_feed[1], src, len, cmd));
}
close(pipe_feed[1]);