summaryrefslogtreecommitdiffstats
path: root/run-command.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-26 22:37:26 +0100
committerJunio C Hamano <gitster@pobox.com>2016-02-26 22:37:26 +0100
commit8ef250c55908d1c752267ea4a05e0a421a729723 (patch)
treebdee3a156606ad533e9d45faacba3ffa81930143 /run-command.c
parentMerge branch 'mm/push-default-warning' (diff)
parentt5504: handle expected output from SIGPIPE death (diff)
downloadgit-8ef250c55908d1c752267ea4a05e0a421a729723.tar.xz
git-8ef250c55908d1c752267ea4a05e0a421a729723.zip
Merge branch 'jk/epipe-in-async'
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 019f6d19a5..863dad52f1 100644
--- a/run-command.c
+++ b/run-command.c
@@ -625,6 +625,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 {
@@ -670,6 +675,11 @@ int in_async(void)
return process_is_async;
}
+void NORETURN async_exit(int code)
+{
+ exit(code);
+}
+
#endif
int start_async(struct async *async)