Backport: Workaround for session process not exiting immediately

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion 2025-08-04 00:04:55 +02:00
parent a4dd5b3c44
commit 32d0de3d2d
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

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