diff options
Diffstat (limited to 'src/macos.zig')
| -rw-r--r-- | src/macos.zig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/macos.zig b/src/macos.zig index b180d7ba..a2175f3d 100644 --- a/src/macos.zig +++ b/src/macos.zig @@ -1313,15 +1313,15 @@ fn drainInbox(st: *State) bool { host_io.commandEof(st.core, &st.ptys, e.pane, st, closeWatched); continue; } - // Unwatched, a command's exit is read here, as its end. - if (st.core.panes[e.pane]) |pane| if (pane.command != null) { - const status = host_io.exitStatus(pt.pid, 100); - if (status != null) pt.pid = 0; // reaped: no shell to retire - reap(st, e.pane); - st.core.update(.{ .exited = .{ .pane = e.pane, .status = status } }); - st.core.update(.{ .eof = .{ .pane = e.pane } }); - continue; - }; + // Unwatched, a command's exit is read here, as its end, + // and a shell's, for a run waiting on it and the log. + const command = if (st.core.panes[e.pane]) |pane| pane.command != null else false; + const status = host_io.exitStatus(pt.pid, 100); + if (status != null) pt.pid = 0; // reaped: no shell to retire + reap(st, e.pane); + if (command or status != null) st.core.update(.{ .exited = .{ .pane = e.pane, .status = status } }); + st.core.update(.{ .eof = .{ .pane = e.pane } }); + continue; } reap(st, e.pane); st.core.update(.{ .eof = .{ .pane = e.pane } }); |
