fix(host): 跨进程启动串行化可继承管道窗口

This commit is contained in:
2026-09-09 05:51:47 +08:00
parent 57acbc0e32
commit b3b4feb2db
6 changed files with 84 additions and 9 deletions
@@ -0,0 +1,8 @@
//! Coordinate Host-controlled Windows launches while inheritable handles exist.
//! This does not serialize foreign libraries that bypass this Host boundary.
use std::sync::{Mutex, MutexGuard};
static CREATION: Mutex<()> = Mutex::new(());
pub(crate) fn lock() -> Result<MutexGuard<'static, ()>, &'static str> {
CREATION.lock().map_err(|_| "PROCESS_CREATION_LOCK_FAILED")
}