X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/3ec3b44c7eefdfae28b083b3ae94ded756f5fcb5..6e2baa6661b0cc4ce2fe2aa06bc27a2a39ed3231:/wsockd/wsockd.c diff --git a/wsockd/wsockd.c b/wsockd/wsockd.c index 2f131004..7c8cec2c 100644 --- a/wsockd/wsockd.c +++ b/wsockd/wsockd.c @@ -1,8 +1,8 @@ /* - * wsockd.c: charybdis websockets helper + * wsockd.c: solanum websockets helper * Copyright (C) 2007 Aaron Sethman * Copyright (C) 2007 ircd-ratbox development team - * Copyright (C) 2016 William Pitcock + * Copyright (C) 2016 Ariadne Conill * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -177,18 +177,15 @@ static rb_dlink_list dead_list; static void conn_plain_read_shutdown_cb(rb_fde_t *fd, void *data); -#ifndef _WIN32 static void dummy_handler(int sig) { return; } -#endif static void setup_signals() { -#ifndef _WIN32 struct sigaction act; act.sa_flags = 0; @@ -211,7 +208,6 @@ setup_signals() act.sa_handler = dummy_handler; sigaction(SIGALRM, &act, 0); -#endif } static int @@ -951,7 +947,7 @@ int main(int argc, char **argv) { const char *s_ctlfd, *s_pipe, *s_pid; - int ctlfd, pipefd, maxfd; + int ctlfd, pipefd, maxfd, x; maxfd = maxconn(); s_ctlfd = getenv("CTL_FD"); @@ -961,7 +957,7 @@ main(int argc, char **argv) if(s_ctlfd == NULL || s_pipe == NULL || s_pid == NULL) { fprintf(stderr, - "This is the charybdis wsockd for internal ircd use.\n"); + "This is the solanum wsockd for internal ircd use.\n"); fprintf(stderr, "You aren't supposed to run me directly. Exiting.\n"); exit(1); @@ -971,8 +967,6 @@ main(int argc, char **argv) pipefd = atoi(s_pipe); ppid = atoi(s_pid); -#ifndef _WIN32 - int x = 0; for(x = 0; x < maxfd; x++) { if(x != ctlfd && x != pipefd && x > 2) @@ -991,7 +985,7 @@ main(int argc, char **argv) if(x > 2) close(x); } -#endif + setup_signals(); rb_lib_init(NULL, NULL, NULL, 0, maxfd, 1024, 4096); rb_linebuf_init(4096);