ethumbd - drop priority to 19 like efreetd so it lurks in bg as much as it can

This commit is contained in:
Carsten Haitzler 2013-12-28 10:28:57 +09:00
parent 0aa4de9f1d
commit 332a54d1c6
1 changed files with 12 additions and 0 deletions

View File

@ -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();