Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

docs(shell-exec): note PID forwarding in forward_signals doc (#2452)

Maximilian Roos3fdabd6d47db
diff --git a/src/shell_exec.rs b/src/shell_exec.rs
index 1019a3249..8b145c52f 100644
--- a/src/shell_exec.rs
+++ b/src/shell_exec.rs
@@ -866,8 +866,11 @@ impl Cmd {
///
/// When combined with [`Cmd::inherit_stdin()`], the new-pgroup isolation
/// is skipped (the child shares the parent's pgroup so it can drive the
- /// controlling terminal). The signal listener still runs so signal-derived
- /// child exits surface as `WorktrunkError::ChildProcessExited { signal: .. }`.
+ /// controlling terminal); the listener then forwards by PID single-shot
+ /// rather than `killpg`-with-escalation, so externally-delivered signals
+ /// (e.g. `kill -TERM <wt-pid>`) still reach the child. Either way,
+ /// signal-derived child exits surface as
+ /// `WorktrunkError::ChildProcessExited { signal: .. }`.
///
/// Only affects `.stream()` on Unix. No-op on Windows.
pub fn forward_signals(mut self) -> Self {