* fix: restore terminal pgrp after PATH lookup
Snapshot the terminal foreground process group before the shell PATH
probe in ShellCommandLocator.runShellCommand and restore it on return,
so `watch` sessions keep TTY foreground ownership and Ctrl+C keeps
working after CLI commands.
Block SIGTTOU on the calling thread across the restoring tcsetpgrp: the
restore runs from a background process group (the probe shell moves the
terminal foreground and the post-completion kill(-pgid) cleanup strands
it), where the default SIGTTOU action would otherwise stop the CLI.
* fix: harden terminal foreground restoration
* fix: preserve newer terminal foreground jobs
* fix: restore redirected terminal ownership
* fix: harden terminal foreground recovery
* fix: recover dead terminal descendant groups
* fix: reject unrelated terminal foreground groups
* fix: isolate interactive PATH probes
* fix: define detached spawn flag on Linux
* fix: support detached probes on Linux
* test: gate detached session proof to Linux
* fix: restore terminal pgrp after PATH lookup
Snapshot the terminal foreground process group before the shell PATH
probe in ShellCommandLocator.runShellCommand and restore it on return,
so `watch` sessions keep TTY foreground ownership and Ctrl+C keeps
working after CLI commands.
Block SIGTTOU on the calling thread across the restoring tcsetpgrp: the
restore runs from a background process group (the probe shell moves the
terminal foreground and the post-completion kill(-pgid) cleanup strands
it), where the default SIGTTOU action would otherwise stop the CLI.
* fix: harden terminal foreground restoration
* fix: preserve newer terminal foreground jobs
* fix: restore redirected terminal ownership
* fix: harden terminal foreground recovery
* fix: recover dead terminal descendant groups
* fix: reject unrelated terminal foreground groups
* fix: isolate interactive PATH probes
* fix: support detached probes on Linux
* test: gate detached session proof to Linux
* fix: define detached spawn flag on Linux
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>