Add interactive client terminal transport
This commit is contained in:
parent
d597b05484
commit
6816f0632e
1 changed files with 1454 additions and 59 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue