Skip to content

Commit 6a95a57

Browse files
committed
freebsd adding rfork api
1 parent 86dff58 commit 6a95a57

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

libc-test/semver/freebsd.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,15 @@ REG_NOTEOL
922922
REG_PEND
923923
REG_STARTEND
924924
REG_TRACE
925+
RFCFDG
926+
RFFDG
927+
RFLINUXTHPN
928+
RFMEM
929+
RFNOWAIT
930+
RFPROC
931+
RFSPAWN
932+
RFTHREAD
933+
RFTSIGZMB
925934
RLIMIT_AS
926935
RLIMIT_CORE
927936
RLIMIT_CPU

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,17 @@ pub const HOSTNAME_INCORRECTNAME: ::c_int = 1;
12341234
pub const HOSTNAME_INVALIDADDR: ::c_int = 2;
12351235
pub const HOSTNAME_INVALIDNAME: ::c_int = 3;
12361236

1237+
// For rfork
1238+
pub const RFFDG: ::c_int = 4;
1239+
pub const RFPROC: ::c_int = 16;
1240+
pub const RFMEM: ::c_int = 32;
1241+
pub const RFNOWAIT: ::c_int = 64;
1242+
pub const RFCFDG: ::c_int = 4096;
1243+
pub const RFTHREAD: ::c_int = 8192;
1244+
pub const RFLINUXTHPN: ::c_int = 65536;
1245+
pub const RFTSIGZMB: ::c_int = 524288;
1246+
pub const RFSPAWN: ::c_int = 2147483648;
1247+
12371248
const_fn! {
12381249
{const} fn _ALIGN(p: usize) -> usize {
12391250
(p + _ALIGNBYTES) & !_ALIGNBYTES
@@ -1580,6 +1591,7 @@ extern "C" {
15801591

15811592
pub fn nmount(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int) -> ::c_int;
15821593
pub fn setproctitle(fmt: *const ::c_char, ...);
1594+
pub fn rfork(flags: ::c_int) -> ::c_int;
15831595
pub fn cpuset_getaffinity(
15841596
level: cpulevel_t,
15851597
which: cpuwhich_t,

0 commit comments

Comments
 (0)