summaryrefslogtreecommitdiff
path: root/src/tty/tty.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 22:25:46 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit4073d1576876107e0750a51682a64319cf0c08c2 (patch)
treeb036d5393d862b988e9b88b3bee2f321100d4408 /src/tty/tty.zig
parent33f62509fc515c767cbef8d329d7666697e54ae7 (diff)
downloadpardes-4073d1576876107e0750a51682a64319cf0c08c2.tar.gz
pardes-4073d1576876107e0750a51682a64319cf0c08c2.zip
Kill stops a command pane's whole line again, now it runs with job control
With the line run under job control (the change before), the job running has a group of its own, and Kill's SIGTERM to the tty's foreground group stopped only that job: of `sleep 30; touch x` the touch still ran. For a command pane the hosts now signal the shell's group as well, so the whole line stops, as it did; a line typed at a prompt still loses only its foreground job. The test forks a real pty for both halves: a background job outliving its command and the pty's hangup, and a killed line not running on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/tty/tty.zig')
-rw-r--r--src/tty/tty.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tty/tty.zig b/src/tty/tty.zig
index b18f4de5..96aec9a9 100644
--- a/src/tty/tty.zig
+++ b/src/tty/tty.zig
@@ -1273,7 +1273,7 @@ const Shell = struct {
const s = of(ctx);
// A command whose exit is recorded is reaped: its group may be
// another's by now.
- if (s.ptys[pane]) |pt| if (!pt.cmd.exited) host_io.signalTty(pt.pid, pt.file.handle, sig);
+ if (s.ptys[pane]) |pt| if (!pt.cmd.exited) host_io.signalTty(pt.pid, pt.file.handle, sig, pt.cmd.watched);
}
/// The pane is gone: hang its pty up, which the kernel passes on to the