diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2003-03-23 16:45:45 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2003-03-23 16:45:45 +0000 |
commit | 48012b330a08a81af84a5ff1d901ddc5e24a942f (patch) | |
tree | 5db85242b9d752d0a39af6f7f71c24235ddee775 /src/inspircd_io.cpp | |
parent | 08e384bb24398224856c44baa51b51977644de9d (diff) |
Changed so that when the process detaches, it changes its own priority to a low value to avoid using a lot of CPU
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@168 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd_io.cpp')
-rw-r--r-- | src/inspircd_io.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index d8e095441..366fa799c 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -14,6 +14,9 @@ * --------------------------------------------------- */ +#include <sys/resource.h> +#include <sys/types.h> +#include <unistd.h> #include "inspircd.h" #include "inspircd_io.h" #include "inspircd_util.h" @@ -77,6 +80,7 @@ int DaemonSeed (void) close(0); close(1); close(2); + setpriority(PRIO_PROCESS,(int)getpid(),15); /* ircd sets to low process priority so it doesnt hog the box */ return (TRUE); } |