On Thu, Feb 2, 2012 at 03:27, Matt <[email protected]> wrote: > Childprocess, not the current process. Remember in Unix the 3 child FDs are > just 0 1 and 2, and can really be anything (readable or writeable or both), > which is how qmail-queue works (and it's also how shell piping and > redirection works). Qmail-queue expects to be able to read from both FD 0 > and FD 1, which means we have to be able to pipe to those FDs. > > Here's a test program, which should give the idea of how I expect this to > work: > > https://gist.github.com/1720985 > > Here's how I currently (in Node 0.4.x) write to > qmail-queue: https://github.com/baudehlo/Haraka/blob/master/plugins/queue/qmail-queue.js > > Hope that helps somewhat. > > This could be solved somewhat for Unix by making all I/O for stdin/stdout go > via a pipe (a Unix pipe, not a Stream.pipe()), I think. But I don't know how > to fix that in the node core. > > Matt.
Matt, .stdin and .stdout *are* pipes on Unices - but they're pipes that have their respective read and write ends closed. It seems rather daft for a program to try to read from STDOUT_FILENO. Why does qmail work that way?
