diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-29 17:58:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-29 19:38:53 -0300 |
| commit | 74286e81e88a6df7586ead9e8bcd503d44446a85 (patch) | |
| tree | 0c03cdcc8cd61096d53d6610ef0f0fc9698cfb6e /src | |
| parent | 3a5db21504a653cc5e97b98edad59a6262a3b8e9 (diff) | |
| download | pardes-74286e81e88a6df7586ead9e8bcd503d44446a85.tar.gz pardes-74286e81e88a6df7586ead9e8bcd503d44446a85.zip | |
docs: views in the guide and reference (a session attached already takes another view, up to four; Detach lets one go); phase 4 notes in docs/next-daemon.md; tty: Screen.hungUp reads a test terminal's fd as the test build has it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/tty/tty.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tty/tty.zig b/src/tty/tty.zig index f949d571..b56e74b1 100644 --- a/src/tty/tty.zig +++ b/src/tty/tty.zig @@ -1329,8 +1329,9 @@ const Screen = struct { /// Its terminal hung up, or the stub that waits on it is gone. fn hungUp(sc: *const Screen) bool { const stub = if (sc.primary) daemon.stub else sc.stub; + const handle = if (@TypeOf(sc.tty.fd) == std.Io.File) sc.tty.fd.handle else sc.tty.fd; var fds = [_]posix.pollfd{ - .{ .fd = sc.tty.fd.handle, .events = 0, .revents = 0 }, + .{ .fd = handle, .events = 0, .revents = 0 }, .{ .fd = stub, .events = 0, .revents = 0 }, }; _ = posix.poll(fds[0..if (stub >= 0) 2 else 1], 0) catch return false; |
