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

Problems spawning processes in Windows #182

Closed
cowboyd opened this issue Aug 6, 2020 · 4 comments · Fixed by #202 or #213
Closed

Problems spawning processes in Windows #182

cowboyd opened this issue Aug 6, 2020 · 4 comments · Fixed by #202 or #213
Labels
@effection/node windows Support for Microsoft Window
Milestone

Comments

@cowboyd
Copy link
Member

cowboyd commented Aug 6, 2020

When you spawn a child process in windows,

  1. it does not die when you call process.kill
  2. causes a separate window to open up every time

Potentially related https://stackoverflow.com/questions/32705857/cant-kill-child-process-on-windows ?

Consider using [execa] ?

@cowboyd cowboyd added @effection/node windows Support for Microsoft Window labels Aug 6, 2020
@taras
Copy link
Member

taras commented Aug 20, 2020

execa looks like a good way to go. I tried cross-spawn and it doesn't support SIGTERM, hopefully execa does.

@taras
Copy link
Member

taras commented Aug 20, 2020

For reference nodejs/node#12378

@jbolda
Copy link
Contributor

jbolda commented Aug 26, 2020

In execa, it tries SIGTERM and if no response then falls back to SIGKILL.
https://github.com/sindresorhus/execa#killsignal-options

Seems to be the quickest win here. Drop in execa and if in the future more control is required, back it out with good test coverage.

GitHub
Process execution for humans. Contribute to sindresorhus/execa development by creating an account on GitHub.

@cowboyd
Copy link
Member Author

cowboyd commented Aug 27, 2020

@jbolda agree, let's see if we can just use execa.

@pittst3r pittst3r changed the title Probelms spawning processes in Windows Problems spawning processes in Windows Aug 27, 2020
@jnicklas jnicklas added this to the v1 milestone Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@effection/node windows Support for Microsoft Window
Projects
None yet
4 participants