child_process: guard against race condition
authorRich Trott <rtrott@gmail.com>
Thu, 24 Dec 2015 21:00:29 +0000 (13:00 -0800)
committerMyles Borins <mborins@us.ibm.com>
Tue, 19 Jan 2016 19:52:33 +0000 (11:52 -0800)
commit35e32985caf6e71c7f8c0b4339cd27b7bcd75b08
treed6dd4a1f9e990ff0bc6900a1df6bb275447e968c
parent41fcda840c3bf66cd5b90d30fe61a188acdd4cd9
child_process: guard against race condition

It is possible that the internal hnadleMessage() might try to send to
a channel that has been closed. The result can be an AssertionError.
Guard against this.

Fixes: https://github.com/nodejs/node/issues/4205
PR-URL: https://github.com/nodejs/node/pull/4418
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
lib/internal/child_process.js
test/parallel/test-cluster-disconnect-race.js [new file with mode: 0644]