aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/ethumb_client/ethumbd.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-28 10:28:57 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-28 10:28:57 +0900
commit332a54d1c6fdbf77e56bc45a69ced91c36f6af1a (patch)
tree8bc6dfbf217de782740cd4fe6eac3f09151bc656 /src/bin/ethumb_client/ethumbd.c
parentefreet - minor formatting and move set prirority to very start (diff)
downloadefl-332a54d1c6fdbf77e56bc45a69ced91c36f6af1a.tar.gz
ethumbd - drop priority to 19 like efreetd so it lurks in bg as much as it can
Diffstat (limited to '')
-rw-r--r--src/bin/ethumb_client/ethumbd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bin/ethumb_client/ethumbd.c b/src/bin/ethumb_client/ethumbd.c
index d8140aa925..a57ee3dabf 100644
--- a/src/bin/ethumb_client/ethumbd.c
+++ b/src/bin/ethumb_client/ethumbd.c
@@ -30,6 +30,12 @@
#include <unistd.h>
#include <errno.h>
+#include <stdlib.h>
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif
+
#include <Eina.h>
#include <Ecore_Getopt.h>
#include <Ecore.h>
@@ -1705,6 +1711,12 @@ main(int argc, char *argv[])
int child;
double timeout = 30.0;
+#ifdef HAVE_SYS_RESOURCE_H
+ setpriority(PRIO_PROCESS, 0, 19);
+#elif _WIN32
+ SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
+#endif
+
memset(&ed, 0, sizeof(ed));
ecore_init();
eina_init();