summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-07 15:43:12 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-07 15:43:12 +0000
commitf80d40018af3c47f710f6e787ed54dc72a416d8a (patch)
tree649d4a45d14dffb77da511a44d9e1872c847ef81
parent05d2b12c2c3e0cc639bd6bbb60363f14a1916c0d (diff)
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
-rw-r--r--src/inspircd_io.cpp9
1 files changed, 4 insertions, 5 deletions
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);