diff --git a/src/cgroup.c b/src/cgroup.c index 5140f023..a64ae574 100644 --- a/src/cgroup.c +++ b/src/cgroup.c @@ -139,7 +139,7 @@ static int cgroup_leaf_init(char *group, char *name, int pid, const char *cfg) char path[256]; _d("group %s, name %s, pid %d, cfg %s", group, name, pid, cfg ?: "NIL"); - if (pid <= 1) { + if (pid < 0 || pid == 1) { errno = EINVAL; return 1; } diff --git a/src/getty.c b/src/getty.c index ba0e9f4a..3180da3f 100644 --- a/src/getty.c +++ b/src/getty.c @@ -185,7 +185,7 @@ static int do_login(char *name) { struct stat st; - cgroup_user(name, getpid()); + cgroup_user(name, 0); execl(_PATH_LOGIN, _PATH_LOGIN, name, NULL); /*