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.
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.
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 thecommand-fds
crate (https://github.com/google/command-fds), but we are looking forwards to migrating to thesubprocess
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 toVec
s or files and using pipes - after all on Linux the standard streams are just file descriptors.