MCPcopy Create free account
hub / github.com/git/git / run_thread

Function run_thread

run-command.c:1041–1059  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1039static pthread_key_t async_die_counter;
1040
1041static void *run_thread(void *data)
1042{
1043 struct async *async = data;
1044 intptr_t ret;
1045
1046 if (async->isolate_sigpipe) {
1047 sigset_t mask;
1048 sigemptyset(&mask);
1049 sigaddset(&mask, SIGPIPE);
1050 if (pthread_sigmask(SIG_BLOCK, &mask, NULL)) {
1051 ret = error("unable to block SIGPIPE in async thread");
1052 return (void *)ret;
1053 }
1054 }
1055
1056 pthread_setspecific(async_key, async);
1057 ret = async->proc(async->proc_in, async->proc_out, async->data);
1058 return (void *)ret;
1059}
1060
1061static NORETURN void die_async(const char *err, va_list params)
1062{

Callers

nothing calls this directly

Calls 3

pthread_sigmaskFunction · 0.85
errorFunction · 0.85
pthread_setspecificFunction · 0.85

Tested by

no test coverage detected