◐ Shell
clean mode source ↗

child_process: tracking unrefdness of child_process by thlorenz · Pull Request #5827 · nodejs/node

- initializing `_unref` to `false` when child process is created
- updating that value each time either `unref()` or `ref()` is invoked
- this mirrors the implementation in `lib/net.js`
- adding test to check unrefdness tracking

@thlorenz mentioned this pull request

Mar 21, 2016

@jasnell jasnell added the semver-minor

PRs that contain new features and should be released in the next minor version.

label

Mar 21, 2016
- using strictEqual in tests

Fishrock123 added a commit to Fishrock123/node that referenced this pull request

Apr 7, 2016
This allows third-party tools to check whether or not a handle that
can be unreferenced is unreferenced at a particular time.
Notably, this should be helpful for inspection via AsyncWrap.

Also, this is useful even to node's internals, particularly timers.

Refs: nodejs#5828
Refs: nodejs#5827
PR-URL: nodejs#5834
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

evanlucas pushed a commit that referenced this pull request

May 17, 2016
This allows third-party tools to check whether or not a handle that
can be unreferenced is unreferenced at a particular time.
Notably, this should be helpful for inspection via AsyncWrap.

Also, this is useful even to node's internals, particularly timers.

Refs: #5828
Refs: #5827
PR-URL: #5834
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>