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
WIP: Windows and PhantomJS 2.0 #505
Conversation
The issue is that chocolatey is using a shim now to exec phantomjs. After testem received all test results from PhantomJS, it tries to kill the process, but only has the PID of the shim, which already exited. I don't have an idea how to workaround this atm. 😞 Using plain PhantomJS 2.0 on Windows works as expected. //cc @stefanpenner |
ahh, can we pull in someone from the chocolatey team? |
Maybe @ferventcoder or @Iristyle? Is there a way to keep the shim running and kill the tree? |
8ad4352
to
c97cf67
Compare
Help me understand what you want to do. It sounds like this tool should kill phantomjs.exe (the actual, not the shim). The shim should be blocking until phantomjs shuts down. |
Currently I'm sending SIGTERM to the process with the pid I spawned (which I guess is the shim). This seems to kill the shim, but not phantomjs. When I'm installing phantomjs manually or use 1.9.8 this works as expected. I'll look into other ways to kill the tree on windows, but other test runners are using the approach and it works well a cross platforms and browsers. |
I wonder if we can enhance shims that receive a SIGTERM to destroy the tree? That seems like a much better option. |
I created https://github.com/chocolatey/shimgen/issues/11 to handle this. |
That sounds great. Here is a small example script to reproduce the issue: var cp = require('child_process');
var p = cp.spawn('phantomjs', ['--webdriver=8910'], {}); // The wd arg just keeps phantom listening
p.on('close', function() {
console.log('Should be called.')
});
setTimeout(function() {
p.kill();
}, 2000); |
Thanks. I will have something out after a bit. |
So I can't find a nice way to handle SIGKILL but SIGTERM is going to be in Chocolatey 0.9.9 (you will need to regenerate your shims). It will be out in rc8 (due out this weekend). |
c97cf67
to
830c805
Compare
830c805
to
334a77c
Compare
WIP: Windows and PhantomJS 2.0
I take it you are good to go? :) |
Yes, I had to switch from |
Chocolatey is installing PhantomJS now inside %PATH%