-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Impossible to kill a triggered shell script in Windows #137
Comments
You may need to trap |
Wow. This was opened some good months ago... I'm sorry for such delay of mine 😞 I'm assuming that the code that listens for Lines 286 to 292 in ba6f25a
Some context: https://stackoverflow.com/a/14861513/2083599: |
So, some further reading tells me that this may be an issue with old Node.js versions that didn't cope with this Windows limitation. This reminded me that processes spawned by concurrently on Windows do run in non-detached mode though, so they should be killed when the parent process is terminated. I will have to do some investigation on this. |
Using GitHub Actions with npx concurrently --success=first "npx foo" "(sleep 5 || timeout 5 > NUL) && npx bar" Notes:
👉 It appears that |
This happens for me on Node18 on Windows 10. Any child processes started by I launch the parent node process from Java or another shell (e.g. Cygwin), and kill that process then all child processes are leaked. I'm currently working around this by enumerating descendent processes and killing them directly. |
Example:
We're having the following inside of our scripts in
package.json
(I've removed all unnecessary clutter):The
client.sh
file looks like this:Running
npm run test
works just fine, but stopping the script doesn't stop the triggered shell script nor the javascript script inside of it.The text was updated successfully, but these errors were encountered: