Add interactive client terminal transport

This commit is contained in:
ms2k 2026-07-17 06:59:39 +09:00
commit 6816f0632e

View file

@ -1464,6 +1464,18 @@ pub fn exec_target(target: TargetCommand) -> io::Error {
.exec()
}
/// Stops this process until the host resumes it.
///
/// # Errors
/// Returns an error when the kernel refuses the stop signal.
#[allow(clippy::disallowed_methods)]
pub fn suspend_current_process() -> io::Result<()> {
Ok(rustix::process::kill_process(
rustix::process::getpid(),
Signal::STOP,
)?)
}
#[cfg(test)]
mod tests {
use std::cell::Cell;