X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Faio%2Flio_listio.c;h=0799c15d8b16f362eb3f5d5b813c23f124c214a2;hb=e9f4fd1185badfc005fcfe5c7de27d58baec057c;hp=7b6a03d3c1f7d1edf3197c53d19146dd0563dc2b;hpb=63a4c9adf227a6f6a5f7f70f6dc3f8863f846927;p=musl diff --git a/src/aio/lio_listio.c b/src/aio/lio_listio.c index 7b6a03d3..0799c15d 100644 --- a/src/aio/lio_listio.c +++ b/src/aio/lio_listio.c @@ -113,7 +113,7 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st if (st) { pthread_attr_t a; - sigset_t set; + sigset_t set, set_old; pthread_t td; if (sev->sigev_notify == SIGEV_THREAD) { @@ -128,13 +128,13 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st } pthread_attr_setdetachstate(&a, PTHREAD_CREATE_DETACHED); sigfillset(&set); - pthread_sigmask(SIG_BLOCK, &set, &set); + pthread_sigmask(SIG_BLOCK, &set, &set_old); if (pthread_create(&td, &a, wait_thread, st)) { free(st); errno = EAGAIN; return -1; } - pthread_sigmask(SIG_SETMASK, &set, 0); + pthread_sigmask(SIG_SETMASK, &set_old, 0); } return 0;