Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/shailevi23/fio
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/shailevi23/fio:
  helper_thread: fix pthread_sigmask typo.
  configure: improve pthread_sigmask detection.
  • Loading branch information
vincentkfu committed Oct 19, 2023
2 parents 2038b72 + 8647425 commit 21958b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,8 @@ cat > $TMPC <<EOF
#include <signal.h> /* pthread_sigmask() */
int main(void)
{
return pthread_sigmask(0, NULL, NULL);
sigset_t sigmask;
return pthread_sigmask(0, NULL, &sigmask);
}
EOF
if compile_prog "" "$LIBS" "pthread_sigmask" ; then
Expand Down
5 changes: 3 additions & 2 deletions helper_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ static int read_from_pipe(int fd, void *buf, size_t len)

static void block_signals(void)
{
#ifdef HAVE_PTHREAD_SIGMASK
#ifdef CONFIG_PTHREAD_SIGMASK
sigset_t sigmask;

int ret;

ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask);
assert(ret == 0);
ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL);
assert(ret == 0);
#endif
}

Expand Down

0 comments on commit 21958b9

Please sign in to comment.