hniksic / rust-subprocess

Execution of and interaction with external processes and pipelines
Apache License 2.0
425 stars 44 forks source link

Support for file descriptors on Linux #71

Open dominik-korsa opened 11 months ago

dominik-korsa commented 11 months ago

Hi, in a project I'm a contributor of we need to call an external binary, which uses an extra file descriptor (FD 3) for output, in addition to stdout and stderr. Currently we are using std::process together with the command-fds crate (https://github.com/google/command-fds), but we are looking forwards to migrating to the subprocess crate (to make use of the timeout and non-blocking I/O features). Is it possible to use custom file descriptors together with rust-subprocess? Ideally custom FDs would support all the features which standard streams (stdin, stdout, stderr) support, like reading/writing to Vecs or files and using pipes - after all on Linux the standard streams are just file descriptors.

hniksic commented 11 months ago

Custom file descriptors are currently not supported. The library is currently not very actively maintained, since std::process now has many more features compared to when I started writing subprocess.