Skip to content

Commit

Permalink
Resolve issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vkrasnov committed Mar 26, 2019
1 parent 3de7358 commit ef41fbe
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,11 @@ impl<T> Daemonize<T> {
new
}

/// Execute `action` just before exiting the parent process. Most common usecase is to syncronize with
/// Execute `action` just before exiting the parent process. Most common usecase is to synchronize with
/// forked processes.
pub fn exit_action<F: Fn() + Sized + 'static>(self, action: F) -> Daemonize<T> {
let mut new: Daemonize<T> = unsafe { transmute(self) };
new.exit_action = Box::new(action);
new
pub fn exit_action<F: Fn() + Sized + 'static>(mut self, action: F) -> Daemonize<T> {
self.exit_action = Box::new(action);
self
}

/// Configuration for the child process's standard output stream.
Expand Down

0 comments on commit ef41fbe

Please sign in to comment.