X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=helper_thread.c;h=ad2e83b4e18f8812642683a8358d8a8ccd71d9b1;hb=c31092b8ac06;hp=28f6cca323d303fc370877610ba65513d509cd39;hpb=c9964510c46844015a8f1509b792a171ab753969;p=fio.git diff --git a/helper_thread.c b/helper_thread.c index 28f6cca3..ad2e83b4 100644 --- a/helper_thread.c +++ b/helper_thread.c @@ -1,3 +1,4 @@ +#include #ifdef CONFIG_VALGRIND_DEV #include #else @@ -137,6 +138,18 @@ static void *helper_thread_main(void *data) sk_out_assign(hd->sk_out); +#ifdef HAVE_PTHREAD_SIGMASK + { + sigset_t sigmask; + + /* Let another thread handle signals. */ + ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask); + assert(ret == 0); + ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL); + assert(ret == 0); + } +#endif + #ifdef CONFIG_PTHREAD_CONDATTR_SETCLOCK clock_gettime(CLOCK_MONOTONIC, &ts); #else