-
Notifications
You must be signed in to change notification settings - Fork 73
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
Adding kill functionallity for win. #44
Conversation
@@ -3,3 +3,4 @@ npm-debug.* | |||
test/fixtures/(* | |||
test/fixtures/shebang_noenv | |||
test/tmp | |||
.vscode/ |
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.
This should probably be in your global gitignore.
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.
You are right. I'll revert it in next commit.
I've added tests, but they are useless as for now, because they don't fail when this |
@Igmat the motivation is that, on windows, the |
Partially. Actually in simple cases it works, and that's why those tests do not fail. But in more complicated case default |
@Igmat Yes a reproducible test case would be awesome. I see many popular projects using |
I've added pretty big complicated case and commented new |
As I said it fails on Windows. See this build. Strange thing that it was succeeded for |
Ok, so as I understand problem is that I spawn |
@satazor, ok I've done my best to test this stuff. But as for now, I have no idea how to narrow it more... I'll probably ask guys from |
@kentcdodds may be you have some thoughts on it? |
If Jest's spawning is causing issues for you, you might try the |
In testem I'm using similar code https://github.com/testem/testem/blob/f32d3edb38852d44fe842f0bceab132ca4ccbe6e/lib/process-ctl.js#L200-L220 as libuv under Windows always force kills processes (no SIGTERM) https://github.com/libuv/libuv/blob/912d42b7285fc29869472106d1c736f34ac91521/src/win/process.c#L1171, which in some cases causes child processes of the spawned process to never be killed. The magic is the I would also like to see this merged, but please with support for disabling |
I'm preparing a new release and I'm looking at this PR again. Regarding overwriting |
I've landed a major overhaul to the project in the master branch. This means that the changes on this PR need to be rebased. For now, I will close this PR since there's no answer for my question regarding specifying signals with kill. I might reopen if necessary. |
It was too long ago. Actually, I'm not an expert in that how processes managed in Windows, so I can't answer for your previous question @satazor. I just wanted to have same behavior at different systems for CI purposes and all I need was just simple |
Unfortunately, not having a cross platform |
Hotfix for #40.
Used implementation for
kill
function fromnode-cross-spawn-with-kill
so many thanks to @kentcdodds.This fix will provide sync killing in
win32
environment and will use default node implementation for*nix
.Motivation
Due to this discussion and that
kill
is part of node API I think that it's not out of scope for this package.TODO: