#include <errno.h>
#include <netdb.h>
#include <pthread.h>
+#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
static int
handle_client_connections(int server_fd)
{
+ struct sigaction ign;
struct sockaddr_storage client_addr;
struct thread_param *param;
socklen_t sizeof_client_addr;
int client_fd;
int error;
+ /* Ignore SIGPIPES, they're handled apart */
+ ign.sa_handler = SIG_IGN;
+ sigaction(SIGPIPE, &ign, NULL);
+
listen(server_fd, config_get_server_queue());
sizeof_client_addr = sizeof(client_addr);