mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Improve pledge() and unveil() further
- Fix getpriority() - Add AT_MINSIGSTKSZ - Fix bugs in BPF code - Show more stuff in printargs.com - Write manual test for pledge.com - pledge() now generates tinier BPF code - Have pledge("exec") only enable execve() - Fix pledge.com chroot setuid functionality - Improve pledge.com unveiling of ape loader
This commit is contained in:
parent
31ac58a57b
commit
f968e2a726
17 changed files with 722 additions and 412 deletions
|
@ -27,12 +27,14 @@
|
|||
* @param which can be PRIO_PROCESS, PRIO_PGRP, PRIO_USER
|
||||
* @param who is the pid, pgid, or uid, 0 meaning current
|
||||
* @param value ∈ [-NZERO,NZERO) which is clamped automatically
|
||||
* @return nonzero on success or -1 w/ errno
|
||||
* @return 0 on success or -1 w/ errno
|
||||
* @error EACCES if lower that RLIMIT_NICE
|
||||
* @error EACCES on Linux without CAP_SYS_NICE
|
||||
* @see getpriority(), nice()
|
||||
*/
|
||||
int setpriority(int which, unsigned who, int value) {
|
||||
if (!IsWindows()) {
|
||||
return sys_setpriority(which, who, value); /* TODO(jart): -20 */
|
||||
return sys_setpriority(which, who, value);
|
||||
} else {
|
||||
return sys_getsetpriority_nt(which, who, value, sys_setpriority_nt);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue