#pseudo-terminal #buffer #linux-kernel #data #write #lets #tty

ttyecho

ttyecho is a crate that lets you write data a into Linux kernel pseudoterminal buffer

3 releases

0.1.2 Aug 13, 2019
0.1.1 Aug 13, 2019
0.1.0 Aug 11, 2019

#8 in #pseudo-terminal

23 downloads per month

MIT license

3KB

ttyecho is a crate that lets you write data into a Linux kernel pseudoterminal buffer. This crate will not work on a non-Linux platform.

Example

fn main() {
    // You can put whatever you want, not only commands.
    let command = "echo ttyecho!";
    // Target tty 
    let tty = "/dev/pts/27";
    // We want to append new line as we want to run echo without user interaction.
    let append_new_line = true;
    
    ttyecho(tty, command, append_new_line);
}

Dependencies

~44KB