diff options
Diffstat (limited to 'src/host_io.zig')
| -rw-r--r-- | src/host_io.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/host_io.zig b/src/host_io.zig index a363a578..3fed6e1d 100644 --- a/src/host_io.zig +++ b/src/host_io.zig @@ -231,7 +231,7 @@ pub const Adoptions = struct { pub fn adoptShell(a: *Adoptions, core: *pardes.Pardes, pid: libc.pid_t, fd: c_int) void { if (pid == 0) { var buf: [96]u8 = undefined; - return core.setMessage(core.view().active, if (a.taken == 0) "Adopt: no shell of a session that died is waiting" else std.fmt.bufPrint(&buf, "Adopt: {d} shell{s} taken in; what they showed is gone", .{ a.taken, if (a.taken == 1) "" else "s" }) catch "Adopt: shells taken in"); + return core.setMessage(core.view().active, if (a.taken == 0) "Adopt: no shell of a session that died is waiting" else std.fmt.bufPrint(&buf, "Adopt: {d} shell{s} taken in; what they showed is gone", .{ a.taken, if (a.taken == 1) "" else "s" }) catch unreachable); // a count fits 96 } if (a.len < a.list.len) { a.list[a.len] = .{ .pid = pid, .fd = fd, .pane = null }; @@ -246,7 +246,7 @@ pub const Adoptions = struct { // No room for it: its master goes, and the shell with this session. _ = libc.close(fd); var buf: [96]u8 = undefined; - core.setMessage(core.view().active, std.fmt.bufPrint(&buf, "Adopt: no room for shell {d}; it ends with this session", .{pid}) catch "Adopt: no room for a shell"); + core.setMessage(core.view().active, std.fmt.bufPrint(&buf, "Adopt: no room for shell {d}; it ends with this session", .{pid}) catch unreachable); // a pid fits 96 } /// The adopted shell pane `pane`'s spawn takes, off the list. |
