From 538d208948737f315c301cb0ac4b72a1ee525d6b Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 20 Mar 2016 02:03:32 -0500 Subject: [PATCH] ircd: ircd main: use librb functions for daemon management --- ircd/ircd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ircd/ircd.c b/ircd/ircd.c index c2432219..435dd265 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -220,6 +220,7 @@ init_sys(void) static int make_daemon(void) { +#ifndef _WIN32 int pid; int pip[2]; char c; @@ -254,7 +255,7 @@ make_daemon(void) /* fclose(stdin); fclose(stdout); fclose(stderr); */ - +#endif return 0; } @@ -420,7 +421,7 @@ check_pidfile(const char *filename) if(fgets(buff, 20, fb) != NULL) { pidfromfile = atoi(buff); - if(!kill(pidfromfile, 0)) + if(!rb_kill(pidfromfile, 0)) { printf("ircd: daemon is already running\n"); exit(-1);