Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56ba4b5b authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

logd: logd placed into background cgroup

Change-Id: I38d7be05ab77fc944a9dbef2b6575d4caa920d08
parent 5204b158
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;
    }