-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Add timeout
and killSignal
options to child_process
spawn()
and fork()
#27639
Comments
|
Yes you're correct, it does not make sense. I changed the original post to only target |
child_process
options more consistent between the different methodstimeout
and killSignal
options to child_process
spawn()
and fork()
spawn and fork are thought to be used mostly for longer running processes, not one shots like exec and spawnSync, which is why I suppose the options were not implemented. However, I can see why that assumption isn't necessarily true, and consistency is useful. Do you have time and interest in contributing this feature? |
Hi @sam-github, thanks! Yes I can submit a PR. |
@ehmicky note that the feature will need tests, which will take more time than the implementation code/docs itself. Just so you know what you are getting into :-) |
Yes I was expecting that :) |
I'll take a shot at this. |
Add support for timeout and killSignal to spawn and fork. Fixes: nodejs#27639
Add support for timeout and killSignal to spawn and fork. Fixes: nodejs#27639
Add support for timeout and killSignal to spawn and fork. Fixes: nodejs#27639
Add support for timeout to spawn and fork. Fixes: nodejs#27639
Add support for timeout to spawn and fork. Fixes: nodejs#27639
Add support for timeout to spawn and fork. Fixes: nodejs#27639
Add support for timeout to spawn and fork. Fixes: nodejs#27639
Add support for timeout to spawn and fork. Fixes: nodejs#27639
Add support for timeout to spawn and fork. Fixes: nodejs#27639
Add support for timeout to spawn and fork. Fixes: nodejs#27639 PR-URL: nodejs#37256 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Is your feature request related to a problem? Please describe.
The
timeout
andkillSignal
options are available inexecFile[Sync]()
,exec[Sync]()
,spawnSync()
but not inspawn()
norfork()
.Those methods could be useful for
spawn()
andfork()
too. For example, projects likeexeca
(by @sindresorhus) use userland code to bring those options tospawn()
.Describe the solution you'd like
Add those options to
spawn()
andfork()
.The text was updated successfully, but these errors were encountered: