diff options
-rw-r--r-- | main.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -3,6 +3,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <signal.h> #include <sys/socket.h> #include <netinet/in.h> #include <errno.h> @@ -148,9 +149,17 @@ void srandomdev(void){ } #endif +void signal_handler(int sig){ + if(sig==SIGPIPE){ + // ignore + } +} + int main(int argc,char **argv){ srandomdev(); + signal(SIGPIPE,signal_handler); + plugin_init(); for(int i=1;i<argc;i++){ plugin_register(argv[i]); |