diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-05-18 14:40:06 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-05-18 14:40:06 -0700 |
| commit | c555e529ac1d29ed98229698d38f77ebb684a017 (patch) | |
| tree | f33f100493be4c07ad3b59d72dbcaeb853d1481b /run-command.c | |
| parent | 920f2ea33bdf06dfda272a146c6fbce2ae11bf99 (diff) | |
| parent | ed84387a6bfe271e9c1edd277bb6fad54c6a6f0b (diff) | |
| download | git-c555e529ac1d29ed98229698d38f77ebb684a017.tar.xz | |
Merge branch 'jk/push-client-deadlock-fix' into HEAD
Some Windows SDK lacks pthread_sigmask() implementation and fails
to compile the recently updated "git push" codepath that uses it.
* jk/push-client-deadlock-fix:
Windows: only add a no-op pthread_sigmask() when needed
Windows: add pthread_sigmask() that does nothing
t5504: drop sigpipe=ok from push tests
fetch-pack: isolate sigpipe in demuxer thread
send-pack: isolate sigpipe in demuxer thread
run-command: teach async threads to ignore SIGPIPE
send-pack: close demux pipe before finishing async process
Diffstat (limited to 'run-command.c')
| -rw-r--r-- | run-command.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/run-command.c b/run-command.c index c72601056c..2d6628012d 100644 --- a/run-command.c +++ b/run-command.c @@ -590,6 +590,16 @@ static void *run_thread(void *data) struct async *async = data; intptr_t ret; + if (async->isolate_sigpipe) { + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGPIPE); + if (pthread_sigmask(SIG_BLOCK, &mask, NULL) < 0) { + ret = error("unable to block SIGPIPE in async thread"); + return (void *)ret; + } + } + pthread_setspecific(async_key, async); ret = async->proc(async->proc_in, async->proc_out, async->data); return (void *)ret; |
