-
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: add AbortSignal support #36308
Conversation
18912bb
to
a3cdc6c
Compare
@nodejs/child_process |
doc/api/child_process.md
Outdated
@@ -330,6 +334,21 @@ getVersion(); | |||
function. Any input containing shell metacharacters may be used to trigger | |||
arbitrary command execution.** | |||
|
|||
If the `AbortSignal` option is enabled, calling `.abort()` on the corresponding |
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.
It's called signal
above, right? (I guess this is what your bikeshedding note is about.)
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.
No I think this is just a mistake on my part unrelated to the bikeshedding?
doc/api/child_process.md
Outdated
For example: | ||
|
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.
For example: |
I, for one, would love more consistency between the different |
@addaleax I intend to add them to all of the APIs - I just find large'ish PRs are harder to land in Node and get meaningful reviews so I made smaller ones. The idea is to add this to fork and spawn later. If you feel strongly that it should happen in the same PR I am happy to push the commit that adds it to fork and span here if you will review it (Perhaps I already have a branch with a commit on top of this one that adds it 😅 ). Otherwise I would rather land this and then land the spawn/fork changes in a follow up PR. |
a3cdc6c
to
1da4e0b
Compare
1da4e0b
to
72fac8b
Compare
PR-URL: #36308 Reviewed-By: Rich Trott <[email protected]>
Landed in 20de5f7 will follow up shortly with form and spawn |
I think somehow ncu pushed something that shouldn't have been here - investigating |
It looks like indeed this landed after last CI since I squashed, somehow this change that wasn't in the original (and commits) and didn't go through CI got in. This is probably a PBKAC on my part and I landed the squashed commit with NCU |
PR-URL: #36308 Reviewed-By: Rich Trott <[email protected]>
PR-URL: #36435 Notable changes: * child_processes: * add AbortSignal support (Benjamin Gruenbaum) (#36308) * deps: * update ICU to 68.1 (Michaël Zasso) (#36187) * events: * support signal in EventTarget (Benjamin Gruenbaum) (#36258) * graduate Event, EventTarget, AbortController (James M Snell) (#35949) * http: * enable call chaining with setHeader() (pooja d.p) (#35924) * module: * add isPreloading indicator (James M Snell) (#36263) * stream: * support abort signal (Benjamin Gruenbaum) (#36061) * add FileHandle support to Read/WriteStream (Momtchil Momtchev) (#35922) * worker: * add experimental BroadcastChannel (James M Snell) (#36271)
PR-URL: nodejs#36308 Reviewed-By: Rich Trott <[email protected]>
PR-URL: #36435 Notable changes: * child_processes: * add AbortSignal support (Benjamin Gruenbaum) (#36308) * deps: * update ICU to 68.1 (Michaël Zasso) (#36187) * events: * support signal in EventTarget (Benjamin Gruenbaum) (#36258) * graduate Event, EventTarget, AbortController (James M Snell) (#35949) * http: * enable call chaining with setHeader() (pooja d.p) (#35924) * module: * add isPreloading indicator (James M Snell) (#36263) * stream: * support abort signal (Benjamin Gruenbaum) (#36061) * add FileHandle support to Read/WriteStream (Momtchil Momtchev) (#35922) * worker: * add experimental BroadcastChannel (James M Snell) (#36271)
PR-URL: #36435 Notable changes: * child_processes: * add AbortSignal support (Benjamin Gruenbaum) (#36308) * deps: * update ICU to 68.1 (Michaël Zasso) (#36187) * events: * support signal in EventTarget (Benjamin Gruenbaum) (#36258) * graduate Event, EventTarget, AbortController (James M Snell) (#35949) * http: * enable call chaining with setHeader() (pooja d.p) (#35924) * module: * add isPreloading indicator (James M Snell) (#36263) * stream: * support abort signal (Benjamin Gruenbaum) (#36061) * add FileHandle support to Read/WriteStream (Momtchil Momtchev) (#35922) * worker: * add experimental BroadcastChannel (James M Snell) (#36271)
PR-URL: nodejs#36308 Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#36308 Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#36308 Reviewed-By: Rich Trott <[email protected]>
PR-URL: #36308 Backport-PR-URL: #38386 Reviewed-By: Rich Trott <[email protected]>
Support
AbortSignal
inchild_process.execFile
.Bikeshedding:
signal
and that it's the web platform guidance - but I think we might want to deviate here and call the parameterabortSignal
to prevent confusion with OS signals andkillSignal
. WDYT?I will follow up with support in the other child_process APIs like fork and spawn.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes