summaryrefslogtreecommitdiff
path: root/test/parallel/test-worker-no-stdin-stdout-interaction.js
Commit message (Collapse)AuthorAgeFilesLines
* test: add common.mustSucceedTobias Nießen2020-10-171-1/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/35086 Reviewed-By: Ruy Adorno <ruyadorno@github.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* worker: only unref port for stdin if we ref’ed it beforeAnna Henningsen2019-06-201-0/+20
We set the `kStartedReading` flag from `_read()` for Worker stdio, and then `ref()` the port. However, the `.on('end')` handler is also attached when `._read()` is not called, e.g. when `process.stdin` inside a Worker is prematurely ended because stdin was not enabled by the parent thread. In that case, we should not call `.unref()` for stdin if we did not also call `.ref()` for it before. Fixes: https://github.com/nodejs/node/issues/28144 PR-URL: https://github.com/nodejs/node/pull/28153 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>