Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Mar 13, 2024
1 parent e17c866 commit 4776bb2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions frankenphp.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,15 +730,10 @@ static void *manager_thread(void *arg) {
// SIGPIPE must be masked in non-Go threads:
// https://pkg.go.dev/os/signal#hdr-Go_programs_that_use_cgo_or_SWIG
sigset_t set;
if (pthread_sigmask(SIG_SETMASK, NULL, &set) != 0) {
perror("failed to get sigmask");
exit(EXIT_FAILURE);
}

sigaddset(&set, SIGPIPE);
sigemptyset(&set) : sigaddset(&set, SIGPIPE);

if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0) {
perror("failed to set sigmask");
perror("failed to block SIGPIPE");
exit(EXIT_FAILURE);
}

Expand Down

0 comments on commit 4776bb2

Please sign in to comment.