summaryrefslogtreecommitdiff
path: root/src/tty
diff options
context:
space:
mode:
Diffstat (limited to 'src/tty')
-rw-r--r--src/tty/tty.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tty/tty.zig b/src/tty/tty.zig
index d17316e8..b18f4de5 100644
--- a/src/tty/tty.zig
+++ b/src/tty/tty.zig
@@ -1050,12 +1050,13 @@ const Shell = struct {
return true;
}
_ = libc.close(pt.file.handle);
- // Unwatched, a command's exit is read here, as its end.
+ // 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 (core.panes[e.id]) |pn| pn.command != null else false;
- const status = if (command) host_io.exitStatus(pt.pid, 100) else null;
+ const status = host_io.exitStatus(pt.pid, 100);
if (status == null) host_io.retireShell(pt.pid);
s.ptys[e.id] = null;
- if (command) core.update(.{ .exited = .{ .pane = @intCast(e.id), .status = status } });
+ if (command or status != null) core.update(.{ .exited = .{ .pane = @intCast(e.id), .status = status } });
}
core.update(.{ .eof = .{ .pane = @intCast(e.id) } });
},