diff --git a/frankenphp.c b/frankenphp.c index a623b850d..2dca61105 100644 --- a/frankenphp.c +++ b/frankenphp.c @@ -727,7 +727,8 @@ 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"); @@ -735,7 +736,7 @@ static void *manager_thread(void *arg) { } sigaddset(&set, SIGPIPE); - + if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0) { perror("failed to set sigmask"); exit(EXIT_FAILURE);