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. On Wed, Feb 1, 2012 at 7:10 PM, Arlo Breault <[email protected]> wrote: > process.stdout.write(new Buffer("Works for me.")) > > > On Sun, Jan 22, 2012 at 9:45 AM, Matt <[email protected]> wrote: > >> I posted here a few months ago about how I had used child_process with >> customFds mapped to a pipe() (from the internal bindings API) to be able to >> write to stdout for qmail-queue (which reads from descriptor 1). Someone on >> here (I forget who now) promised there would be a solution somehow, but I >> still can't see it being possible... >> >> Is there any way this will ever work now with Node? Could stdout be made >> a read-write stream instead of just a readable stream? >> >> Matt. >> > >
