aboutsummaryrefslogtreecommitdiff
path: root/write_or_die.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 /write_or_die.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 'write_or_die.c')
-rw-r--r--write_or_die.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/write_or_die.c b/write_or_die.c
index e7afe7a29..49e80aa22 100644
--- a/write_or_die.c
+++ b/write_or_die.c
@@ -1,8 +1,12 @@
#include "cache.h"
+#include "run-command.h"
static void check_pipe(int err)
{
if (err == EPIPE) {
+ if (in_async())
+ async_exit(141);
+
signal(SIGPIPE, SIG_DFL);
raise(SIGPIPE);
/* Should never happen, but just in case... */