I am working on an application that needs to send email with qmail-queue. For those not familiar with this system, qmail-queue reads a pre-formatted email message on file descriptor 0 (stdin as usual) and then reads the envelope data (sender and list of recipients) on file descriptor 1 (stdout but in the opposite direction as usual).
I am looking at std::process, and I can’t find a way to hook into stdout this way. Both Command and Child are designed for the normal use case, for reading from stdout (that the child process writes to).
Is there a way to accomplish this non-standard redirect in the standard library, or do I need to wire it up more manually with the libc crate?