pub enum SessionExitPolicy {
Sweep,
LetMembersSurvive,
}Expand description
Policy for what natural completion (the leader exiting on its own) does with a still-live isolated/pty session.
A background member that keeps the pty slave (or a contained descendant holding a captured pipe) open prevents the master EOF that the historical natural gate waited on — without a sweep the job would hang forever (the A4-3 seam). This policy tells Core whether the sweep is the completion trigger (default, kill-totality) or whether members may survive the leader.
Variants§
Sweep
Sweep the contained session once the leader is reaped: SIGKILL live
session members and hold completion until the session is empty
(kill-totality, the historic containment guarantee). The sweep is the
trigger, not a side-effect of EOF — a slave-holding member is killed
and then the master can EOF. Cannot be combined with
CancelPolicy::None (which opts out of all signaling).
LetMembersSurvive
Report completion on leader-reap without signaling the session: a
background member (e.g. nohup sleep &) survives the leader, matching
plain POSIX shell semantics. The leader-reap remains the completion
gate so the slave-holding-member hang is still impossible.
Trait Implementations§
Source§impl Clone for SessionExitPolicy
impl Clone for SessionExitPolicy
Source§fn clone(&self) -> SessionExitPolicy
fn clone(&self) -> SessionExitPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more