summaryrefslogtreecommitdiff
path: root/run-command.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 /run-command.c
parent2d5ff66c134681d846e5102a9a62ec99c2178fe1 (diff)
parent43f3afc6bc6b79715ea46aaf341683cbba6ee965 (diff)
downloadgit-fbef03d6ab6b9ee23ba1cf895f47314fe4308d2c.tar.gz
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 'run-command.c')
-rw-r--r--run-command.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/run-command.c b/run-command.c
index 13fa452e8c..3add1d66ac 100644
--- a/run-command.c
+++ b/run-command.c
@@ -633,6 +633,11 @@ int in_async(void)
return !pthread_equal(main_thread, pthread_self());
}
+void NORETURN async_exit(int code)
+{
+ pthread_exit((void *)(intptr_t)code);
+}
+
#else
static struct {
@@ -678,6 +683,11 @@ int in_async(void)
return process_is_async;
}
+void NORETURN async_exit(int code)
+{
+ exit(code);
+}
+
#endif
int start_async(struct async *async)