Skip to content

Commit 8ba9ba2

Browse files
authored
Merge pull request #1656 from darcyliu/bsd-wait4
Add wait4 for macOS and FreeBSD
2 parents 23fdf42 + 6885600 commit 8ba9ba2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/unix/bsd/mod.rs

+14
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,20 @@ extern "C" {
776776
value: *mut ::c_void,
777777
) -> ::c_int;
778778
pub fn acct(filename: *const ::c_char) -> ::c_int;
779+
#[cfg_attr(
780+
all(target_os = "macos", target_arch = "x86"),
781+
link_name = "wait4$UNIX2003"
782+
)]
783+
#[cfg_attr(
784+
all(target_os = "freebsd", any(freebsd12, freebsd11, freebsd10)),
785+
link_name = "wait4@FBSD_1.0"
786+
)]
787+
pub fn wait4(
788+
pid: ::pid_t,
789+
status: *mut ::c_int,
790+
options: ::c_int,
791+
rusage: *mut ::rusage,
792+
) -> ::pid_t;
779793
}
780794

781795
cfg_if! {

0 commit comments

Comments
 (0)