openbsd port (#279)
with libc update, ucontext data is finally available on this platform too.
This commit is contained in:
parent
14d1f63e56
commit
774cfb685e
@ -128,6 +128,9 @@ impl ConfigTarget for Command {
|
|||||||
rlim_max: 0,
|
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) };
|
let mut ret = unsafe { libc::setrlimit(libc::RLIMIT_AS, &r) };
|
||||||
if ret < 0 {
|
if ret < 0 {
|
||||||
return Err(io::Error::last_os_error());
|
return Err(io::Error::last_os_error());
|
||||||
|
4
scripts/shmem_limits_obsd.sh
Executable file
4
scripts/shmem_limits_obsd.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user