Struct libpulse_binding::def::SpawnApi
source · #[repr(C)]pub struct SpawnApi {
pub prefork: Option<extern "C" fn()>,
pub postfork: Option<extern "C" fn()>,
pub atfork: Option<extern "C" fn()>,
}Expand description
A structure for the spawn API.
This may be used to integrate auto spawned daemons into your application. For more information
see context::Context::connect. When spawning a new child process the waitpid() is used on
the child’s PID. The spawn routine will not block or ignore SIGCHLD signals, since this cannot
be done in a thread compatible way. You might have to do this in prefork/postfork.
Fields
prefork: Option<extern "C" fn()>Is called just before the fork in the parent process.
postfork: Option<extern "C" fn()>Is called immediately after the fork in the parent process.
atfork: Option<extern "C" fn()>Is called immediately after the fork in the child process.
It is not safe to close all file descriptors in this function unconditionally, since a UNIX socket (created using socketpair()) is passed to the new process.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SpawnApi
impl Send for SpawnApi
impl Sync for SpawnApi
impl Unpin for SpawnApi
impl UnwindSafe for SpawnApi
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more