am 04b30a06: Merge "logd: logd placed into background cgroup"

* commit '04b30a06380dd64fac6812ed438d25da0c99a849':
  logd: logd placed into background cgroup
This commit is contained in:
Mark Salyzyn 2015-02-04 15:49:38 +00:00 committed by Android Git Automerger
commit d7839f9e09
1 changed files with 5 additions and 0 deletions

View File

@ -29,6 +29,7 @@
#include <unistd.h>
#include <cutils/properties.h>
#include <cutils/sched_policy.h>
#include "private/android_filesystem_config.h"
#include "CommandListener.h"
@ -69,6 +70,10 @@ static int drop_privs() {
struct sched_param param;
memset(&param, 0, sizeof(param));
if (set_sched_policy(0, SP_BACKGROUND) < 0) {
return -1;
}
if (sched_setscheduler((pid_t) 0, SCHED_BATCH, &param) < 0) {
return -1;
}