diff --git a/Cargo.toml b/Cargo.toml index 0af4527..f247ad0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,8 @@ serde_json = "1.0" wasmtime = "11" wat = "1.0" +# PTY-backed job support +portable-pty = "0.10" # tokenization / globbing shlex = "1.1" globset = "0.4" diff --git a/src/job_control.rs b/src/job_control.rs index 1ee9327..e001e63 100644 --- a/src/job_control.rs +++ b/src/job_control.rs @@ -2,7 +2,12 @@ use once_cell::sync::Lazy; use std::process::Command; use std::sync::atomic::{AtomicI32, Ordering}; use std::thread; +use std::io::{self, Read, Write}; +use std::time::Duration; + +#[cfg(unix)] use std::os::unix::process::CommandExt; + use libc; static FG_PGID: Lazy = Lazy::new(|| AtomicI32::new(0));