shep-daemon 0.15.2

The supervision engine behind shep: process spawning, restart policy, the log plane, watch and cron restarts, and the RPC server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Rebuilding a successor's Rust-side objects around descriptors it did not
//! open.
//!
//! Every descriptor named here crossed an `execve`: the predecessor carried
//! it through `shep-handover` and wrote its number into the blob. Nothing here opens a file, binds a socket or creates a pipe.
//! `O_APPEND` and the pidfile's `flock` are properties of the open file
//! description, so wrapping keeps both: reopening a log would leave a
//! `copytruncate` rotator a sparse hole, and re-acquiring the lock would open
//! a window for a second daemon to win this home. A descriptor the blob names
//! and the process does not have refuses the whole rehydrate. The pidfile is
//! adopted last, so an earlier refusal leaves it open, unowned, and locked.

mod adopt_descriptors;
mod rehearse_blob;
#[cfg(test)]
mod testing;
pub use adopt_descriptors::{AdoptedSheep, adopt};
pub use rehearse_blob::{discard_blob, dry_run};