From f80d40018af3c47f710f6e787ed54dc72a416d8a Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 7 Apr 2005 15:43:12 +0000 Subject: Fixed "error in free()" and other bugs going to open sockets git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@997 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd_io.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index 4cb245d9a..86583da2b 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -120,11 +120,10 @@ int DaemonSeed (void) exit (0); setsid (); umask (007); - /* close stdout, stdin, stderr */ - close(0); - close(1); - close(2); - + /* close stdin, stdout, stderr */ + freopen("/dev/null","w",stdout); + freopen("/dev/null","w",stderr); + setpriority(PRIO_PROCESS,(int)getpid(),15); /* ircd sets to low process priority so it doesnt hog the box */ return (TRUE); -- cgit v1.2.3