diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-02-26 23:05:31 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-02-26 23:05:31 -0800 |
commit | ce25054826693df3f3698ae2a64f706dc59c0a28 (patch) | |
tree | b7b73b561d6c0ea865405864c8d8c625b0dd90aa /convert.c | |
parent | 2b34e486bc0ce1aabaa024ca97e8b005d9bc53ed (diff) | |
parent | 6424c2ad12cf6c3feb533fab9c4dded7514d0f4c (diff) | |
download | git-ce25054826693df3f3698ae2a64f706dc59c0a28.tar.gz |
Merge branch 'jb/filter-ignore-sigpipe'
* jb/filter-ignore-sigpipe:
Ignore SIGPIPE when running a filter driver
Diffstat (limited to 'convert.c')
-rw-r--r-- | convert.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2,6 +2,7 @@ #include "attr.h" #include "run-command.h" #include "quote.h" +#include "sigchain.h" /* * convert.c - convert a file when checking it out and checking it in. @@ -360,12 +361,16 @@ static int filter_buffer(int in, int out, void *data) if (start_command(&child_process)) return error("cannot fork to run external filter %s", params->cmd); + sigchain_push(SIGPIPE, SIG_IGN); + write_err = (write_in_full(child_process.in, params->src, params->size) < 0); if (close(child_process.in)) write_err = 1; if (write_err) error("cannot feed the input to external filter %s", params->cmd); + sigchain_pop(SIGPIPE); + status = finish_command(&child_process); if (status) error("external filter %s failed %d", params->cmd, status); |