diff --git a/src/widgets/terminal/Command.zig b/src/widgets/terminal/Command.zig index bdf7de7..d315a8c 100644 --- a/src/widgets/terminal/Command.zig +++ b/src/widgets/terminal/Command.zig @@ -69,7 +69,6 @@ pub fn spawn(self: *Command, allocator: std.mem.Allocator) !void { } fn handleSigChild(_: c_int) callconv(.C) void { - std.log.err("sigchild", .{}); const result = std.posix.waitpid(-1, 0); Terminal.global_vt_mutex.lock(); diff --git a/src/widgets/terminal/Terminal.zig b/src/widgets/terminal/Terminal.zig index f84154e..4f2ee6a 100644 --- a/src/widgets/terminal/Terminal.zig +++ b/src/widgets/terminal/Terminal.zig @@ -107,7 +107,10 @@ pub fn deinit(self: *Terminal) void { var vts = global_vts orelse break :pid; if (self.cmd.pid) |pid| _ = vts.remove(pid); - if (vts.count() == 0) vts.deinit(); + if (vts.count() == 0) { + vts.deinit(); + global_vts = null; + } } self.cmd.kill(); if (self.thread) |thread| {