diff --git a/src/main.zig b/src/main.zig index 8697f28..8c4c993 100644 --- a/src/main.zig +++ b/src/main.zig @@ -764,6 +764,9 @@ pub fn main() !void { } _ = std.posix.waitpid(session_pid, 0); + // HACK: It seems like the session process is not exiting immediately after the waitpid call. + // This is a workaround to ensure the session process has exited before re-initializing the TTY. + std.Thread.sleep(std.time.ns_per_s * 1); session_pid = -1; }