wrapper: implement xopen()
[gitweb.git] / convert.c
index 9a5612e93da2058f64bcec20cfd474a8b6b2d223..f3bd3e93fb2ecf95413db3c53d7e686cd03d1e69 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -356,9 +356,14 @@ static int filter_buffer_or_fd(int in, int out, void *data)
        sigchain_push(SIGPIPE, SIG_IGN);
 
        if (params->src) {
-               write_err = (write_in_full(child_process.in, params->src, params->size) < 0);
+               write_err = (write_in_full(child_process.in,
+                                          params->src, params->size) < 0);
+               if (errno == EPIPE)
+                       write_err = 0;
        } else {
                write_err = copy_fd(params->fd, child_process.in);
+               if (write_err == COPY_WRITE_ERROR && errno == EPIPE)
+                       write_err = 0;
        }
 
        if (close(child_process.in))