revert sendfile()

This commit is contained in:
2025-08-04 21:38:15 +02:00
parent b685941da3
commit 770ffa5d9e
3 changed files with 55 additions and 54 deletions

View File

@@ -4,7 +4,6 @@
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/epoll.h>
@@ -33,9 +32,6 @@ static void cws_server_setup_hints(struct addrinfo *hints, const char *hostname)
}
cws_server_ret cws_server_start(cws_config *config) {
/* Ignore SIGPIPE so a write/sendfile to a closed peer doesn't terminate the process */
signal(SIGPIPE, SIG_IGN);
if (!config || !config->hostname || !config->port) {
return CWS_SERVER_CONFIG;
}