6 releases (3 breaking)
Uses old Rust 2015
|0.4.0||Jun 5, 2019|
|0.3.2||Apr 17, 2019|
|0.3.1||Dec 29, 2018|
|0.3.0||Oct 11, 2018|
|0.1.0||May 27, 2018|
#665 in Unix APIs
198 downloads per month
Used in 4 crates (3 directly)
Copyright and license
This project is copyright its authors and licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in
tokio-pty-process by you, as defined in the
Apache-2.0 license, shall be dual licensed as above, without any additional
terms or conditions.
Spawn a child process under a pseudo-TTY, interacting with it asynchronously using Tokio.
A pseudo-terminal (or “pseudo-TTY” or “PTY”) is a special Unix file handle that models the kind of text terminal through which users used to interact with computers. A PTY enables a specialized form of bidirectional interprocess communication that a variety of user-facing Unix programs take advantage of.
The basic way to use this crate is:
- Create a Tokio Reactor that will handle all of your asynchronous I/O.
- Create an
AsyncPtyMasterthat represents your ownership of an OS pseudo-terminal.
- Use your master and the
spawn_pty_async_rawfunctions of the
CommandExtextension trait, which extends
std::process::Command, to launch a child process that is connected to your master.
- Optionally control the child process (e.g. send it signals) through the
Childvalue returned by that function.
This crate only works on Unix since pseudo-terminals are a Unix-specific concept.
Child type is largely copied from Alex Crichton’s