aboutsummaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-10 11:13:38 -0800
committerJunio C Hamano <gitster@pobox.com>2016-03-10 11:13:38 -0800
commitfbef03d6ab6b9ee23ba1cf895f47314fe4308d2c (patch)
tree7ad0cc5376f8aedca61433638f328a188439331c /fetch-pack.c
parent2d5ff66c134681d846e5102a9a62ec99c2178fe1 (diff)
parent43f3afc6bc6b79715ea46aaf341683cbba6ee965 (diff)
downloadgit-fbef03d6ab6b9ee23ba1cf895f47314fe4308d2c.tar.gz
git-fbef03d6ab6b9ee23ba1cf895f47314fe4308d2c.tar.xz
Merge branch 'jk/epipe-in-async' into maint
Handling of errors while writing into our internal asynchronous process has been made more robust, which reduces flakiness in our tests. * jk/epipe-in-async: t5504: handle expected output from SIGPIPE death test_must_fail: report number of unexpected signal fetch-pack: ignore SIGPIPE in sideband demuxer write_or_die: handle EPIPE in async threads
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index 01e34b689..f96f6dfb3 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -15,6 +15,7 @@
#include "version.h"
#include "prio-queue.h"
#include "sha1-array.h"
+#include "sigchain.h"
static int transfer_unpack_limit = -1;
static int fetch_unpack_limit = -1;
@@ -671,9 +672,12 @@ static int everything_local(struct fetch_pack_args *args,
static int sideband_demux(int in, int out, void *data)
{
int *xd = data;
+ int ret;
- int ret = recv_sideband("fetch-pack", xd[0], out);
+ sigchain_push(SIGPIPE, SIG_IGN);
+ ret = recv_sideband("fetch-pack", xd[0], out);
close(out);
+ sigchain_pop(SIGPIPE);
return ret;
}