child_process: add safety checks on stdio access
authorcjihrig <cjihrig@gmail.com>
Thu, 12 Nov 2015 19:30:20 +0000 (14:30 -0500)
committerJames M Snell <jasnell@gmail.com>
Wed, 23 Dec 2015 16:38:33 +0000 (08:38 -0800)
commit8d8e721dbd2d963d52afbc02191829ed6c4d2354
treec217d881baa73c40e7716e039d78f8b28f0f71a2
parentedcb6c060334ee0a15395a95a152a8fd36d2e475
child_process: add safety checks on stdio access

When a child process is spawned, there is no guarantee that stdout
and stderr will be created successfully. This commit adds checks
before attempting to access the streams.

PR-URL: https://github.com/nodejs/node/pull/3799
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
lib/child_process.js