Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Child.send boolean #7739

Closed

Conversation

MylesBorins
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

lib, doc, cluster

Description of change

This is a backport of #3516 and #6998

Originally it was decided to not land #3516 into v4.x as it is semver minor. I would like to ping @nodejs/lts to reconsider as it would appear that the behavior change is accurate to the documentation. Further #6998 also makes a fix based on the documentation that relies on #3516

It may turn out that we do not wish to make a subtle change like this, especially if it can break people in prod. As such I will be running citgm against this to see if there are any obvious failures. If citgm + ci are both green I think we should consider backporting. It is inline with our documentation and will make subtle behavior equivalent in v4 and v6.

@nodejs-github-bot nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. cluster Issues and PRs related to the cluster subsystem. labels Jul 14, 2016
@MylesBorins
Copy link
Contributor Author

/cc @Trott and @cjihrig who are the original authors

@mscdex
Copy link
Contributor

mscdex commented Jul 14, 2016

I know this is a backport, but it seems there is an early return; that needs to be changed yet in the ._send() function. It looks like this change is already in master though...

EDIT: Looks like we need to pull in #3577 too.

Trott and others added 2 commits July 14, 2016 12:47
The documentation indicates that child.send() returns a boolean but it
has returned undefinined at since v0.12.0. It now returns a boolean per
the (slightly updated) documentation.

PR-URL: nodejs#3516
Reviewed-By: Ben Noordhuis <[email protected]>
There are several places in the cluster module where a version
of process.send() is called, but the result is swallowed. Most
of these cases are internal, but Worker.prototype.send(), which
is publicly documented, also suffers from this problem. This
commit exposes the return value to facilitate better error
handling, and bring Worker.prototype.send() into compliance
with the documentation.

PR-URL: nodejs#6998
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ron Korving <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@cjihrig
Copy link
Contributor

cjihrig commented Jul 15, 2016

LGTM once #3577 is included, and the CI is happy. Obviously, it's up to the LTS team though.

@rvagg
Copy link
Member

rvagg commented Jul 18, 2016

A soft -1 from me simply because this is a behaviour change that's nothing close to critical. The impact is fairly minimal, however, and I'm pretty sure it'd not be a breaking change to users in any way unless we uncover some weird edge case with it.

@Fishrock123
Copy link
Contributor

hmmm, yeah, not sure about this. What's the benefit?

@MylesBorins
Copy link
Contributor Author

main benefit in my opinion was being accurate to the docs that have been shipping since the start of v4 and remove a potentially odd / unexpected behavior difference between 4 / 6

At the same time I can respect the potential to break people, and that isn't in the spirit of LTS

@Fishrock123
Copy link
Contributor

May be safer to fix the docs for LTS

@jasnell
Copy link
Member

jasnell commented Jul 20, 2016

I'm also leaning -1 on this.

@MylesBorins
Copy link
Contributor Author

I'm going to close this and opt for a doc fix. Thanks everyone!

@MylesBorins MylesBorins deleted the child.send-boolean branch November 14, 2017 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem. cluster Issues and PRs related to the cluster subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants