diff options
Diffstat (limited to 'src/macos.zig')
| -rw-r--r-- | src/macos.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/macos.zig b/src/macos.zig index 7bfa6c49..97dab9a8 100644 --- a/src/macos.zig +++ b/src/macos.zig @@ -1280,8 +1280,14 @@ fn drainInbox(st: *State) bool { }, .eof => |e| { if (st.gens[e.pane] != e.gen) continue; + // Reaped here, its status kept, it is no shell to retire. + const status = if (st.ptys[e.pane]) |*pt| status: { + const got = host_io.exitStatus(pt.pid, 100); + if (got != null) pt.pid = 0; + break :status got; + } else null; reap(st, e.pane); - st.core.update(.{ .eof = .{ .pane = e.pane } }); + st.core.update(.{ .eof = .{ .pane = e.pane, .status = status } }); }, .lsp_done => |d| { st.core.update(.{ .lsp_resp = .{ .id = d.id, .rows = d.rows } }); |
