Isolate watcher queues and selectively reload resolved service binaries
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
//! Pipe callers must drain stdout and stderr before wait to avoid bounded-pipe deadlocks.
|
||||
use std::{collections::BTreeMap, io, path::{Path, PathBuf}};
|
||||
mod bindings {
|
||||
wit_bindgen::generate!({ path: "../../host/wit", world: "program", generate_all });
|
||||
wit_bindgen::generate!({ path: "../../host/wit", world: "program", generate_all, with: { "wasi:io/poll@0.2.12": ::wasi::io::poll } });
|
||||
}
|
||||
use bindings::sausage::process::host;
|
||||
pub use bindings::wasi::io::streams::{InputStream, OutputStream};
|
||||
pub use host::{Stdio, Watcher, Change, ChangeKind};
|
||||
pub use bindings::wasi::io::poll::{Pollable, poll};
|
||||
pub use wasi::io::poll::{Pollable, poll};
|
||||
/// Hard-stop a process group by a live process ID.
|
||||
pub fn kill(pid: u32) -> io::Result<()> { host::kill(pid).map_err(io::Error::other) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user