child_process: do not access stderr when stdio set to 'ignore'
authorcjihrig <cjihrig@gmail.com>
Sun, 20 Jul 2014 02:35:07 +0000 (22:35 -0400)
committerFedor Indutny <fedor@indutny.com>
Wed, 23 Jul 2014 19:39:28 +0000 (23:39 +0400)
commitea89fdfec4f7a6ff180149a5eacc3c7d84b87e39
tree7e44eda29f35a6021ac63d7124710aad97c429a0
parent2f0017aa53236dc9715ff4989aea8afb02aaa302
child_process: do not access stderr when stdio set to 'ignore'

Currently, checkExecSyncError() attempts to access the contents
of stderr. When stdio is set to 'ignore', this causes a crash.
This commit adds a check on the access of stderr. Closes #7966.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
lib/child_process.js
test/simple/test-child-process-execsync.js