Skip to content

child_process: don't fork bomb ourselves from -e - #3575

Merged
bnoordhuis merged 1 commit into
nodejs:masterfrom
bnoordhuis:fix3574
Oct 29, 2015
Merged

bnoordhuis merged 1 commit into
nodejs:masterfrom
bnoordhuis:fix3574

Conversation

@bnoordhuis

Copy link
Copy Markdown
Member

Remove the -e argument from process.execArgv in child_process.fork()
to keep node -e 'require("child_process").fork("empty.js")' from
spawning itself recursively.

Fixes: #3574

R=@Trott

CI: https://ci.nodejs.org/job/node-test-pull-request/643/

@bnoordhuis bnoordhuis added the child_process Issues and PRs related to the child_process subsystem. label Oct 28, 2015
@cjihrig

cjihrig commented Oct 28, 2015

Copy link
Copy Markdown
Contributor

LGTM

@Trott

Trott commented Oct 28, 2015

Copy link
Copy Markdown
Member

LGTM :shipit:

Remove the `-e` argument from process.execArgv in child_process.fork()
to keep `node -e 'require("child_process").fork("empty.js")'` from
spawning itself recursively.

Fixes: nodejs#3574
PR-URL: nodejs#3575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@bnoordhuis bnoordhuis closed this Oct 29, 2015
@bnoordhuis
bnoordhuis deleted the fix3574 branch October 29, 2015 12:10
@bnoordhuis
bnoordhuis merged commit 57bce60 into nodejs:master Oct 29, 2015
@rvagg

rvagg commented Oct 30, 2015

Copy link
Copy Markdown
Member

suggesting this goes into v4.x-staging after having done some time in v5.0.0, @jasnell what do you think?

@jasnell

jasnell commented Oct 30, 2015

Copy link
Copy Markdown
Member

Agreed but likely better to land it post v4.2.2

@bnoordhuis

Copy link
Copy Markdown
Member Author

It's not a regression in any way (it's a buglet that apparently goes all the way back to v0.6) so it would IMO be perfectly acceptable to leave it out of LTS.

@jasnell

jasnell commented Oct 30, 2015

Copy link
Copy Markdown
Member

@bnoordhuis .. noted! 👍

On Fri, Oct 30, 2015 at 9:55 AM, Ben Noordhuis notifications@github.com
wrote:

It's not a regression in any way (it's a buglet that apparently goes all
the way back to v0.6) so it would IMO be perfectly acceptable to leave it
out of LTS.

—
Reply to this email directly or view it on GitHub
#3575 (comment).

bnoordhuis added a commit that referenced this pull request Nov 7, 2015
Remove the `-e` argument from process.execArgv in child_process.fork()
to keep `node -e 'require("child_process").fork("empty.js")'` from
spawning itself recursively.

Fixes: #3574
PR-URL: #3575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This was referenced Nov 10, 2015
@MylesBorins

Copy link
Copy Markdown
Contributor

@jasnell @bnoordhuis @rvagg has this spent enough time in 5.1.0?

@jasnell

jasnell commented Nov 30, 2015

Copy link
Copy Markdown
Member

@thealphanerd ... I'd say yes.

bnoordhuis added a commit that referenced this pull request Nov 30, 2015
Remove the `-e` argument from process.execArgv in child_process.fork()
to keep `node -e 'require("child_process").fork("empty.js")'` from
spawning itself recursively.

Fixes: #3574
PR-URL: #3575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@bnoordhuis

Copy link
Copy Markdown
Member Author

Yes, I think so.

EDIT: I see you landed it a few minutes ago. :-)

bnoordhuis added a commit that referenced this pull request Dec 4, 2015
Remove the `-e` argument from process.execArgv in child_process.fork()
to keep `node -e 'require("child_process").fork("empty.js")'` from
spawning itself recursively.

Fixes: #3574
PR-URL: #3575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@jasnell jasnell mentioned this pull request Dec 17, 2015
bnoordhuis added a commit that referenced this pull request Dec 17, 2015
Remove the `-e` argument from process.execArgv in child_process.fork()
to keep `node -e 'require("child_process").fork("empty.js")'` from
spawning itself recursively.

Fixes: #3574
PR-URL: #3575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
bnoordhuis added a commit that referenced this pull request Dec 23, 2015
Remove the `-e` argument from process.execArgv in child_process.fork()
to keep `node -e 'require("child_process").fork("empty.js")'` from
spawning itself recursively.

Fixes: #3574
PR-URL: #3575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants