| 1039 | static pthread_key_t async_die_counter; |
| 1040 | |
| 1041 | static 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 | |
| 1061 | static NORETURN void die_async(const char *err, va_list params) |
| 1062 | { |
nothing calls this directly
no test coverage detected