diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-03 22:34:38 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-03 22:34:38 +0000 |
commit | f319b4a3bc4bf6509334679b25357f10dacae72b (patch) | |
tree | 571acceb56e026ad6f4b9d1e6f7d3915c0525a46 /src/inspircd_io.cpp | |
parent | 5f30e68a76f0b4e71884675adb59c931bdb19fb8 (diff) |
Fixes for setpriority on freebsd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@370 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd_io.cpp')
-rw-r--r-- | src/inspircd_io.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index 244316c50..885954881 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -14,7 +14,10 @@ * --------------------------------------------------- */ +#ifdef __linux__ #include <sys/resource.h> +#endif + #include <sys/types.h> #include <unistd.h> #include "inspircd.h" @@ -80,7 +83,11 @@ int DaemonSeed (void) close(0); close(1); close(2); + + #ifdef __linux__ setpriority(PRIO_PROCESS,(int)getpid(),15); /* ircd sets to low process priority so it doesnt hog the box */ + #endif + return (TRUE); } |