Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in helper_thread.c and run block_signals(void) function in linux only #1628

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions helper_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,16 @@ static int read_from_pipe(int fd, void *buf, size_t len)

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

ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask);
assert(ret == 0);
ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL);
assert(ret == 0);
int ret;

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

Expand Down