about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xserver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/server.c b/server.c
index fc3b3d0..8ad47ba 100755
--- a/server.c
+++ b/server.c
@@ -260,8 +260,6 @@ static bool clientPut(const struct Client *client, uint8_t color, char cell) {
 int main() {
     int error;
 
-    signal(SIGPIPE, SIG_IGN);
-
     tilesMap();
 
     int server = socket(PF_LOCAL, SOCK_STREAM, 0);
@@ -304,6 +302,10 @@ int main() {
             if (fd < 0) err(EX_IOERR, "accept");
             fcntl(fd, F_SETFL, O_NONBLOCK);
 
+            int on = 1;
+            error = setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on));
+            if (error) err(EX_IOERR, "setsockopt");
+
             struct Client *client = clientAdd(fd);
 
             struct kevent event = {
15:05:15 -0400'>2021-06-10Stop accumulating ISUPPORT tokens once MOTD startsJune McEnroe 2021-06-09Use seprintf for snip, removing strlcpynJune McEnroe 2021-06-09Use seprintf for reserializeJune McEnroe 2021-06-09Use seprintf for capListJune McEnroe 2021-06-09Add seprintfJune McEnroe 2021-05-27Add pounce-notify to README 2.4June McEnroe 2021-05-27Fix ENVIRONMENT formatting in pounce-notify(1)June McEnroe 2021-05-27Add note about Libera.Chat SASL-only rangesJune McEnroe 2021-05-25Add QUIRKS fileJune McEnroe 2021-05-19Replace freenode with tilde.chatJune McEnroe 2021-05-04notify: Reword pounce-notify manualJune McEnroe 2021-05-02Clean up Makefiles, configure scriptsJune McEnroe 2021-04-30palaver: Exit on getopt failureJune McEnroe 2021-04-30notify: Implement pounce-notifyJune McEnroe