diff options
Diffstat (limited to 'src/macos.zig')
| -rw-r--r-- | src/macos.zig | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/macos.zig b/src/macos.zig index a0abc119..ebe8193b 100644 --- a/src/macos.zig +++ b/src/macos.zig @@ -2505,8 +2505,7 @@ fn startReader(st: *State, pt: *Pty, id: u8) void { /// The pane is gone: its shell goes with it. fn closePty(ctx: ?*anyopaque, pane: u8) void { const st = hostState(ctx); - const pt = st.ptys[pane] orelse return; - _ = libc.kill(pt.pid, posix.SIG.HUP); + if (st.ptys[pane] == null) return; reap(st, pane); st.gens[pane] +%= 1; } @@ -2516,7 +2515,7 @@ fn reap(st: *State, pane: u8) void { st.ptys[pane] = null; pt.reader.cancel(st.io) catch {}; _ = libc.close(pt.file.handle); - _ = libc.waitpid(pt.pid, null, posix.W.NOHANG); + host_io.retireShell(pt.pid); } fn readPty(st: *State, io: std.Io, pty: std.Io.File, id: u8, gen: u32) anyerror!void { |
