Skip to content

Commit 5da2f2c

Browse files
committed
Auto merge of #577 - malbarbo:pthread_atfork, r=alexcrichton
Add pthread_atfork function
2 parents 397f851 + bc7db8c commit 5da2f2c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/unix/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,11 @@ extern {
576576
link_name = "pthread_join$UNIX2003")]
577577
pub fn pthread_join(native: ::pthread_t,
578578
value: *mut *mut ::c_void) -> ::c_int;
579+
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
580+
link_name = "pthread_atfork$UNIX2003")]
581+
pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
582+
parent: Option<unsafe extern fn()>,
583+
child: Option<unsafe extern fn()>) -> ::c_int;
579584
pub fn pthread_exit(value: *mut ::c_void);
580585
pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int;
581586
pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int;

0 commit comments

Comments
 (0)