diff options
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/gui.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 9ada305b..bfa83175 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -3878,13 +3878,19 @@ const Shell = struct { }, .eof => |e| { if (s.gens[e.pane] == e.gen) { + // Reaped here, its status kept, it is no shell to retire. + const status = if (s.ptys[e.pane]) |*pt| status: { + const got = host_io.exitStatus(pt.pid, 100); + if (got != null) pt.pid = 0; + break :status got; + } else null; s.closePty(e.pane); if (e.failure) |err| { if (s.core.panes[e.pane]) |pane| { pane.body.mode = .normal; s.core.reportError(e.pane, "terminal reader", err); } - } else s.core.update(.{ .eof = .{ .pane = e.pane } }); + } else s.core.update(.{ .eof = .{ .pane = e.pane, .status = status } }); } s.saw_event = true; }, |
