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 4e8dd98
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions frankenphp.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,15 +730,11 @@ 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);
}

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 4e8dd98

Please sign in to comment.