openbsd port (#279)

with libc update, ucontext data is finally available on this platform too.
This commit is contained in:
David CARLIER 2021-08-27 10:41:06 +01:00 committed by GitHub
parent 14d1f63e56
commit 774cfb685e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -128,6 +128,9 @@ impl ConfigTarget for Command {
rlim_max: 0,
};
#[cfg(target_os = "openbsd")]
let mut ret = unsafe { libc::setrlimit(libc::RLIMIT_RSS, &r) };
#[cfg(not(target_os = "openbsd"))]
let mut ret = unsafe { libc::setrlimit(libc::RLIMIT_AS, &r) };
if ret < 0 {
return Err(io::Error::last_os_error());

4
scripts/shmem_limits_obsd.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
doas sysctl kern.shminfo.shmmax=536870912
doas sysctl kern.shminfo.shmmin=1
doas sysctl kern.shminfo.shmall=131072000