Skip to content

Commit

Permalink
chore: cs
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Mar 13, 2024
1 parent 6f24b3c commit e17c866
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frankenphp.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,15 +727,16 @@ sapi_module_struct frankenphp_sapi_module = {
STANDARD_SAPI_MODULE_PROPERTIES};

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
// 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);

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

0 comments on commit e17c866

Please sign in to comment.