-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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_process: clean event listener correctly #36424
Conversation
options.signal.addEventListener('abort', () => { | ||
if (!ex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking but: Unrelated style change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I just noticed it's different from the "common" way in other places in the event target code so I fixed my code there. Putting it in a new/different PR/commit seemed like overkill I think. I don't mind reverting it if it's an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, I just wanted to make sure there was a reason beyond personal preference. The inconsistency in curly brace usage throughout the code base bugs me, and I want to make sure any changes have a justification beyond personal preference. It will at least allow us to inch towards consistency. Maybe we'll get there by about 2027.
Commit Queue failed- Loading data for nodejs/node/pull/36424 ✔ Done loading data for nodejs/node/pull/36424 ----------------------------------- PR info ------------------------------------ Title child_process: clean event listener correctly (#36424) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch benjamingr:child-process-signal-leak -> nodejs:master Labels child_process Commits 1 - child_process: clean event listener correctly Committers 1 - Benjamin Gruenbaum PR-URL: https://github.com/nodejs/node/pull/36424 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/36424 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott -------------------------------------------------------------------------------- ✔ Last GitHub Actions successful ℹ Last Full PR CI on 2020-12-09T18:28:27Z: https://ci.nodejs.org/job/node-test-pull-request/34880/ - Querying data for job/node-test-pull-request/34880/ ✔ Build data downloaded ✔ Last Jenkins CI successful ℹ This PR was created on Mon, 07 Dec 2020 10:56:45 GMT ✔ Approvals: 2 ✔ - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/36424#pullrequestreview-548497636 ✔ - Rich Trott (@Trott) (TSC): https://github.com/nodejs/node/pull/36424#pullrequestreview-550773859 ⚠ This PR has conflicts that must be resolved -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/417460344 |
I was working on AbortSignal for spawn and noticed there is a leak in the current code for AbortSignal support in child_process since it removes the wrong listener. I used the new signal as argument feature to make removing the listener easier and added a test.
79e7602
to
b689c7f
Compare
Commit Queue failed- Loading data for nodejs/node/pull/36424 ✔ Done loading data for nodejs/node/pull/36424 ----------------------------------- PR info ------------------------------------ Title child_process: clean event listener correctly (#36424) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch benjamingr:child-process-signal-leak -> nodejs:master Labels child_process Commits 1 - child_process: clean event listener correctly Committers 1 - Benjamin Gruenbaum PR-URL: https://github.com/nodejs/node/pull/36424 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/36424 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - child_process: clean event listener correctly ✔ Last GitHub Actions successful ℹ Last Full PR CI on 2020-12-12T14:34:53Z: https://ci.nodejs.org/job/node-test-pull-request/34880/ ⚠ Commits were pushed after the last Full PR CI run: ⚠ - child_process: clean event listener correctly - Querying data for job/node-test-pull-request/34880/ ✔ Build data downloaded ✔ Last Jenkins CI successful ℹ This PR was created on Mon, 07 Dec 2020 10:56:45 GMT ✔ Approvals: 2 ✔ - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/36424#pullrequestreview-548497636 ✔ - Rich Trott (@Trott) (TSC): https://github.com/nodejs/node/pull/36424#pullrequestreview-550773859 -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/438143838 |
Would be really useful if commit queue would know if I just rebased in a way that didn't actually change after review. |
I was working on AbortSignal for spawn and noticed there is a leak in the current code for AbortSignal support in child_process since it removes the wrong listener. I used the new signal as argument feature to make removing the listener easier and added a test. PR-URL: #36424 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
I was working on AbortSignal for spawn and noticed there is a leak in the current code for AbortSignal support in child_process since it removes the wrong listener. I used the new signal as argument feature to make removing the listener easier and added a test. PR-URL: #36424 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
I was working on AbortSignal for spawn and noticed there is a leak in the current code for AbortSignal support in child_process since it removes the wrong listener. I used the new signal as argument feature to make removing the listener easier and added a test. PR-URL: nodejs#36424 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
I was working on AbortSignal for spawn and noticed there is a leak in the current code for AbortSignal support in child_process since it removes the wrong listener. I used the new signal as argument feature to make removing the listener easier and added a test. PR-URL: nodejs#36424 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
I was working on AbortSignal for spawn and noticed there is a leak in the current code for AbortSignal support in child_process since it removes the wrong listener. I used the new signal as argument feature to make removing the listener easier and added a test. PR-URL: nodejs#36424 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
I was working on AbortSignal for spawn and noticed there is a leak in the current code for AbortSignal support in child_process since it removes the wrong listener. I used the new signal as argument feature to make removing the listener easier and added a test. PR-URL: #36424 Backport-PR-URL: #38386 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
I was working on AbortSignal for spawn and noticed there is a leak in
the current code for AbortSignal support in child_process since it
removes the wrong listener. I used the new signal as argument feature
to make removing the listener easier and added a test.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes