From 32d0de3d2d8eeb3c5d3cf04774dd23a26063b960 Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Mon, 4 Aug 2025 00:04:55 +0200 Subject: [PATCH] Backport: 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 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; }