Skip to content

Commit 3a03ed0

Browse files
committed
docs: bound strict exec retirement claims
1 parent 3afefa0 commit 3a03ed0

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/exec_backend.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,13 @@ impl ExecBackend {
217217
}
218218

219219
/// SIGTERM the whole task — the process GROUP, not just the recorded pid. `spawn` puts each exec
220-
/// task in its own session via `setsid`, so the recorded pid is the group leader (pgid == pid) and
221-
/// `kill(-pid)` reaps the leader AND anything it forked: a `sh -c` wrapper's grandchild (dash forks
222-
/// rather than exec-replacing a bare command), a compound command's pipeline, a daemon's workers.
223-
/// Killing only the leader would leave the real workload orphaned — an incomplete teardown, which
224-
/// is precisely the guarantee st2 must not break. Targeting the group is safe: setsid always
225-
/// succeeds for a freshly-forked child (never itself a group leader), so the group is the task's
226-
/// own, never st2's.
220+
/// task in its own session via `setsid`, so the recorded pid begins as the group leader
221+
/// (pgid == pid), and `kill(-pid)` reaches the leader and anything it forked. Killing only the
222+
/// leader could leave the real workload orphaned.
223+
///
224+
/// This is legacy lifecycle behavior, not race-free retirement: generation observation and
225+
/// numeric process-group signaling are separate operations, so a PID/PGID can be reused between
226+
/// them. Issue #121 owns capability-pinned signaling and exact record retirement.
227227
pub fn kill(&self, id: &str) -> anyhow::Result<()> {
228228
let pid = match self.observe_generation(id)? {
229229
ExecGenerationObservation::Running { pid, .. } => pid as i32,

0 commit comments

Comments
 (0)