From 8d1650299a42674a9b0ade6012a6a08f516a5cdb Mon Sep 17 00:00:00 2001 From: Nate Choe Date: Tue, 15 Feb 2022 16:45:16 -0600 Subject: [PATCH] Moved signal() --- src/main.c | 3 +++ src/runner.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) 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);