diff --git a/src/main.c b/src/main.c index 2341802..d318590 100644 --- a/src/main.c +++ b/src/main.c @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -190,6 +191,8 @@ NULL } } + signal(SIGPIPE, SIG_IGN); + pending = calloc(processes - 1, sizeof(int)); notify = malloc(sizeof(int[2]) * (processes - 1)); threads = malloc(sizeof(pthread_t) * (processes - 1)); diff --git a/src/runner.c b/src/runner.c index b30d8b0..e7da0fb 100644 --- a/src/runner.c +++ b/src/runner.c @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -43,8 +42,6 @@ void *runServer(RunnerArgs *args) { fds[0].fd = notify; fds[0].events = POLLIN; - signal(SIGPIPE, SIG_IGN); - for (;;) { int i; poll(fds, connCount, site->timeout);