From c1ef6b535d314942be8b2611548de4c7328e81a5 Mon Sep 17 00:00:00 2001 From: mohanson Date: Tue, 16 Apr 2024 15:32:08 +0800 Subject: [PATCH] MAX_FDS only limit alive fd now --- script/src/scheduler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/src/scheduler.rs b/script/src/scheduler.rs index 935dde0037..b750760b38 100644 --- a/script/src/scheduler.rs +++ b/script/src/scheduler.rs @@ -395,7 +395,7 @@ where ); } Message::Pipe(vm_id, args) => { - if self.next_fd_slot - FIRST_FD_SLOT >= MAX_FDS { + if self.fds.len() as u64 >= MAX_FDS { let (_, machine) = self .instantiated .get_mut(&vm_id)