Workaround for session process not exiting immediately

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion 2025-08-03 14:56:16 +02:00
parent e404d5bdb3
commit 3f891d7f0d
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}