child process support for Rust
Clone or download
Latest commit db106be Oct 30, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs updated docs Oct 30, 2018
misc resolved the piperef testing thing for now Jul 31, 2016
src replaced try! with ? for Rust 2018 Edition Oct 30, 2018
target/doc updated docs Oct 30, 2018
COPYING added rustdoc; fixed some stuff Jul 19, 2016
Cargo.toml bumped cargo version to 0.1.3 Nov 22, 2017
README.md updated doc location in readme Nov 22, 2017
update-docs.sh added script to update docs for gh-pages Nov 22, 2017

README.md

ptyknot: create a child process running a Rust action

Copyright (c) 2016 Bart Massey

This Rust "crate" provides support for creating a child process running a specified action, optionally with a new pseudo-tty as its controlling terminal and with parent pipes for some of its initial file descriptors. The caller gets the master side of the pseudo-tty and pipes for manipulation, along with the process ID of the child. The caller can then later wait for the child to exit and examine its exit status.

Documentation

The rustdoc is the primary documentation for this crate.

Issues

  • The name "ptyknot" is stupid.

  • This library is quite Linux-specific.

    • It currently requires a Unix-98 ptmx pseudo-tty implementation: the older BSD-style pseudo-ttys are not yet supported.

    • It currently requires a SysV-style controlling terminal implementation that sets a controlling terminal on first tty open. The BSD-style ioctl to set a controlling terminal is not yet supported.

    • There is a comment in the Rust library source that indicates that this code will have memory-related crashes on some UNIX systems, probably because of broken fork or thread implementations. I haven't seen this.

  • This code needs careful review. It's probably full of all kinds of badness.

Notes

This code does not build with rustc 1.8 because of compiler and library bugs.

The misc subdirectory contains some stale prototyping code. It arguably should be removed.

Credits

This work initially borrowed from tty-rs. I only wrote this because I couldn't get that to work with current Rust in my box, and because I wanted slightly different functionality.

Specifically, I wrote this library to allow rewriting the it_works test in my reworked version of rustastic-password. Hopefully I can either get my work pushed upstream there or get a fork published soon.

Many sources of information were used in coding this. They are listed in the source code.

License

This work is made available under the "MIT License". Please see the file COPYING in this distribution for license terms.