feat(sandbox): 限制并取消实例管道工作线程

This commit is contained in:
2026-09-09 00:36:46 +08:00
parent 237ab0f952
commit 12bcc8b1fa
7 changed files with 483 additions and 23 deletions
@@ -268,6 +268,15 @@ impl<'a> Suspended<'a> {
}
}
impl Running<'_> {
#[cfg(feature = "desktop")]
pub fn start_io(
&self,
io: crate::extension_stdio::HostIo,
) -> Result<crate::extension_io::Pump> {
self.check_authorization()?;
crate::extension_io::Pump::start(io, self.process.job.clone_for_deadline()?)
}
pub fn check_authorization(&self) -> Result<()> {
#[cfg(feature = "desktop")]
if let Some(watch) = &self.revocation {