mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Make pledge() less strict about the API
We were previously returning EINVAL but OpenBSD allows it.
This commit is contained in:
parent
695f74035d
commit
4825737509
1 changed files with 3 additions and 0 deletions
|
@ -239,6 +239,9 @@
|
|||
int pledge(const char *promises, const char *execpromises) {
|
||||
int e, rc;
|
||||
unsigned long ipromises, iexecpromises;
|
||||
if (promises && !execpromises) {
|
||||
execpromises = promises;
|
||||
}
|
||||
if (!promises) {
|
||||
// OpenBSD says NULL argument means it doesn't change, i.e.
|
||||
// pledge(0,0) on OpenBSD does nothing. The Cosmopolitan Libc
|
||||
|
|
Loading…
Reference in a new issue