pub struct DaemonManager { /* private fields */ }Expand description
Manage daemons.
A daemon is a process running in the background, doing useful
things. For Obnam benchmarks, it’s the Obnam server, but this is a
generic manager. This version requires the daemonize helper
program to be available on $PATH.
Implementations§
Source§impl DaemonManager
impl DaemonManager
Sourcepub fn timeout(self, millis: u64) -> Self
pub fn timeout(self, millis: u64) -> Self
Set the timeout for waiting on a daemon to start, in milliseconds.
Sourcepub fn start(
&self,
argv: &[&OsStr],
stdout: &Path,
stderr: &Path,
) -> Result<Daemon, DaemonError>
pub fn start( &self, argv: &[&OsStr], stdout: &Path, stderr: &Path, ) -> Result<Daemon, DaemonError>
Start a daemon.
The daemon is considered started if its process id (PID) is known. The daemon may take longer to actually be in a useful state, and it may fail after the PID is known, for example if it reads a configuration file and that has errors. This function won’t wait for that to happen: it only cares about the PID.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DaemonManager
impl RefUnwindSafe for DaemonManager
impl Send for DaemonManager
impl Sync for DaemonManager
impl Unpin for DaemonManager
impl UnwindSafe for DaemonManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more