From 8ceab3130d9b7527d0a59440d5604a0a22321cf9 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Thu, 29 Oct 2026 22:41:50 +0100 Subject: [PATCH] fix(vm): save the tty before the fork and retry waitpid on EINTR The termios save ran after fork, so a child that reached raw mode first would be captured and later restored as-is. A caught signal interrupted waitpid, failed the run, and left the machine running; EINTR now retries the wait. --- crates/ecrou/src/vm.rs | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/crates/ecrou/src/vm.rs b/crates/ecrou/src/vm.rs index 588d322..6854427 100644 --- a/crates/ecrou/src/vm.rs +++ b/crates/ecrou/src/vm.rs @@ -264,6 +264,14 @@ pub fn run_prepared(rootfs: &PreparedRootfs, options: &RunOptions) -> Result Result