X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=convert.c;h=4f8fcb7bbb00b66f1eaa354119784e6ef57e1eb4;hb=6c4ee2244aea924b6d04b4753ca8c7709e8e5f90;hp=27acce58bc4bec60a394f03db1f6e60e1e4cfc3e;hpb=b599672316ae0e0cf827e5e2cd6d3bb403d7b8cd;p=git.git diff --git a/convert.c b/convert.c index 27acce58b..4f8fcb7bb 100644 --- a/convert.c +++ b/convert.c @@ -241,7 +241,7 @@ struct filter_params { const char *cmd; }; -static int filter_buffer(int fd, void *data) +static int filter_buffer(int in, int out, void *data) { /* * Spawn cmd and feed the buffer contents through its stdin. @@ -255,7 +255,7 @@ static int filter_buffer(int fd, void *data) child_process.argv = argv; child_process.use_shell = 1; child_process.in = -1; - child_process.out = fd; + child_process.out = out; if (start_command(&child_process)) return error("cannot fork to run external filter %s", params->cmd); @@ -292,6 +292,7 @@ static int apply_filter(const char *path, const char *src, size_t len, memset(&async, 0, sizeof(async)); async.proc = filter_buffer; async.data = ¶ms; + async.out = -1; params.src = src; params.size = len; params.cmd = cmd;