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 | |
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')
-rw-r--r-- | src/InspIRCd.layout | 14 | ||||
-rw-r--r-- | src/inspircd_io.cpp | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout index 1fa16ace5..af5b80b5f 100644 --- a/src/InspIRCd.layout +++ b/src/InspIRCd.layout @@ -1,6 +1,6 @@ [Editors] -Focused=1 -Order=1 +Focused=7 +Order=1,7 [Editor_0] Open=0 @@ -12,10 +12,10 @@ LeftChar=1 [Editor_1] Open=1 -Top=1 +Top=0 CursorCol=24 CursorRow=322 -TopLine=307 +TopLine=1917 LeftChar=1 [Editor_2] @@ -59,11 +59,11 @@ TopLine=1 LeftChar=1 [Editor_7] -Open=0 -Top=0 +Open=1 +Top=1 CursorCol=1 CursorRow=1 -TopLine=1 +TopLine=36 LeftChar=1 [Editor_8] 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); } |