Struct daemonize_rs::Handle
source · pub struct Handle { /* private fields */ }
Expand description
handle returned from daemonize
to the daemon process
the daemon should use this handle to detach itself from the
parent process, In cases where your program needs to run set up before starting
this can be useful, as the daemon will pipe it’s stdout/stderr to the parent process
to communicate if start up was successful
Implementations
sourceimpl Handle
impl Handle
sourcepub fn detach(&mut self)
pub fn detach(&mut self)
detach the daemon from the parent process this will write “Daemon started successfully” to stdout before detaching
panics
if detach is called more than once
sourcepub fn detach_with_msg<T: AsRef<[u8]>>(&mut self, msg: T)
pub fn detach_with_msg<T: AsRef<[u8]>>(&mut self, msg: T)
detach the daemon from the parent process with a custom message to be printed to stdout before detaching
panics
if detach_with_msg is called more than once
Auto Trait Implementations
impl RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnwindSafe for Handle
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