-
Notifications
You must be signed in to change notification settings - Fork 33
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
SIGINT handler is not killing process #56
Comments
i have the exact same issue. i have a feeling this is because of gulp which is not passing on signals correctly. |
What is the status of this issue? |
Not sure why this got moved from webdriverio as grunt-webdriver exhibits it as well. Any news? |
I am not using gulp-webdriver so if anyone has a solution to this any PRs would be appreciated |
There is one solution that I found to be working - its not ideal but it is something. Returned webdriver({
baseUrl: 'http://localhost:' + config.e2e.port,
specs: config.e2e.specs
}).on(`finish`, () => process.exit(0)); |
@stsvilik effectively closing the process, the only bad thing is that it eliminates all the underlying sub-processes. I have built a nodeJS server and when applying this solution it stops the service. There should be some way to get PID and stop just that process. |
@jasp402 If only we had reference to the right process which spawns |
From @artur-michalak on January 4, 2017 12:5
The problem
When i setup webdriver.io with gulp watch and interrupt process with ctrl+c it's not closing.
Environment
WebdriverIO version: v4.5.2
Node.js version: v4.4.5 (v6 too)
Standalone mode or wdio testrunner: jasmine testrunner
if wdio testrunner, running synchronous or asynchronous tests: asynchronous
Additional wdio packages used (if applicable):
"wdio-dot-reporter": "0.0.6",
"wdio-jasmine-framework": "^0.2.19",
"wdio-selenium-standalone-service": "0.0.7",
"gulp-webdriver": "^2.0.3",
Link to Selenium/WebdriverIO logs
[12:56:45] Finished 'e2e:run' after 16 s
[12:56:45] Finished 'e2e:dev' after 17 s
then on cmd + c click:
End selenium sessions properly ...
(press crtl+c again to hard kill the runner)
Killing process, bye! (on cmd + c click)
Killing process, bye! (on cmd + c click)
Killing process, bye! (on cmd + c click)
Killing process, bye! (on cmd + c click)
Code To Reproduce Issue [ Good To Have ]
gulp.task('e2e:run', function () {
return gulp.src(config.e2e.config).pipe(webdriver({
baseUrl: 'http://localhost:' + config.e2e.port,
specs: config.e2e.specs
})).on('error', handleErrors);
});
// production release of player
gulp.task('e2e:dev', function() {
gulp.watch(config.e2e.specs, ['e2e:run']);
});
Details
I would guess something is wrong with logic here
https://github.com/webdriverio/webdriverio/blob/68974ac33aa13fa099b1870d5a81ce5c6d8341db/lib/launcher.js#L418
Perhaps process.exit is not being called.
Copied from original issue: webdriverio/webdriverio#1798
The text was updated successfully, but these errors were encountered: