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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user