init: Set kernel login class and CPU mask on new processes.
In particular, this makes the kernel login class on processes started from /etc/rc "daemon" instead of "default". Reviewed by: trasz
This commit is contained in:
parent
7120845712
commit
cf48481217
@ -1729,7 +1729,8 @@ setprocresources(const char *cname)
|
||||
login_cap_t *lc;
|
||||
if ((lc = login_getclassbyname(cname, NULL)) != NULL) {
|
||||
setusercontext(lc, (struct passwd*)NULL, 0,
|
||||
LOGIN_SETPRIORITY | LOGIN_SETRESOURCES);
|
||||
LOGIN_SETPRIORITY | LOGIN_SETRESOURCES |
|
||||
LOGIN_SETLOGINCLASS | LOGIN_SETCPUMASK);
|
||||
login_close(lc);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user