[][src]Trait tab_pty_process::CommandExt

pub trait CommandExt {
    fn spawn_pty_async(&mut self, ptymaster: &AsyncPtyMaster) -> Result<Child>;
fn spawn_pty_async_raw(
        &mut self,
        ptymaster: &AsyncPtyMaster
    ) -> Result<Child>; }

An extension trait for the std::process::Command type.

This trait provides new spawn_pty_async and spawn_pty_async_raw methods that allow one to spawn a new process that is connected to the current process through a pseudo-TTY.

Required methods

fn spawn_pty_async(&mut self, ptymaster: &AsyncPtyMaster) -> Result<Child>

Spawn a subprocess that connects to the current one through a pseudo-TTY in canonical (“cooked“, not “raw”) mode.

This function creates the necessary PTY slave and uses std::process::Command::before_exec to do the neccessary setup before the child process is spawned. In particular, it calls setsid() to launch a new TTY sesson.

The child process’s standard input, standard output, and standard error are all connected to the pseudo-TTY slave.

fn spawn_pty_async_raw(&mut self, ptymaster: &AsyncPtyMaster) -> Result<Child>

Spawn a subprocess that connects to the current one through a pseudo-TTY in raw (“non-canonical”, not “cooked”) mode.

This function creates the necessary PTY slave and uses std::process::Command::before_exec to do the neccessary setup before the child process is spawned. In particular, it sets the slave PTY handle to raw mode and calls setsid() to launch a new TTY sesson.

The child process’s standard input, standard output, and standard error are all connected to the pseudo-TTY slave.

Loading content...

Implementations on Foreign Types

impl CommandExt for Command[src]

Loading content...

Implementors

Loading content...