Fixed SIGPIPE

This commit is contained in:
Nate Choe
2022-02-14 17:09:57 -06:00
parent 92a000f474
commit e1fd93f5ab

View File

@@ -20,6 +20,7 @@
#include <assert.h> #include <assert.h>
#include <poll.h> #include <poll.h>
#include <signal.h>
#include <unistd.h> #include <unistd.h>
#include <swebs/runner.h> #include <swebs/runner.h>
@@ -42,6 +43,8 @@ void *runServer(RunnerArgs *args) {
fds[0].fd = notify; fds[0].fd = notify;
fds[0].events = POLLIN; fds[0].events = POLLIN;
signal(SIGPIPE, SIG_IGN);
for (;;) { for (;;) {
int i; int i;
poll(fds, connCount, site->timeout); poll(fds, connCount, site->timeout);