joyent/node — pull request #2454 by mmalecki (2012-01-03 02:41:59+00:00)
Title: child_process: give forks `stdout` and `stderr`

Previously using these streams was not possible because of making them
use given file descriptors. This solution is more generic - it uses
`pipe` function to pipe fork's output into parent's `stdout` and
`stderr` unless `silent: true` is set as an option.

This doesn't break any existing API and it makes `fork` more compatible
with `spawn`.

Please note that fork's `stdout` and `stderr` aren't meant to be used as
communication channels - use `fork(...).send()` instead.

Fixes #2442.

It'd be awesome to backport it to 0.6, it can be merge easily (I can provide another pull request for that). I find current behavior inconsistent with other APIs (also, [documentation doesn't mention it](https://github.com/joyent/node/pull/2442#issuecomment-3333681)).

/cc @bmeck