From 3f891d7f0ddc375ecde9b71afeeaaa30f4e5b5b7 Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Sun, 3 Aug 2025 14:56:16 +0200 Subject: [PATCH] Workaround for session process not exiting immediately Signed-off-by: AnErrupTion --- src/main.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.zig b/src/main.zig index 28b9e9a..47d733d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -806,6 +806,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; }