-
Notifications
You must be signed in to change notification settings - Fork 344
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
Get rid of orphan gauge processes #166
Comments
There is check to gracefully kill child processes from within the runner. Unfortunately, at least in windows there is no easy way [AFAIK] to register a child process to be killed when parent dies, unless there is an explicit "kill process tree" instead of "kill process". Suggestions welcome. |
From @navaneeth on June 26, 2015 7:12 You do this the other way. When Gauge starts, it gets the parent's pid. And keep looking whether the pid is available. If not, it can exit itself. This can be controlled via a command line flag so that it is applicable only when required. |
We should take a look at this article. It could be relevant here. |
@mahendrakariya That article won't help. The approach said in that article works if you have control to trigger the terminate on child process. In this case, gauge parent process itself died making the child go orphan. AFAIK, there is no better way to fix other than the one that was suggested. Rather than relying on PID, which could be reused in some operating systems, you could make a ping API on the gauge core which the runner can keep pinging and if the ping fails, it can exit. |
That's a nice idea @navaneeth. I agree with you. We should do that. |
I should point out that this issue also affects installing a new version of Gauge. During the installation, the user is shown an error message involving "gauge.exe": Opening up task manager and killing each process for |
It was also happening with Intellij on Linux, Mac and Windows. |
This is not working because the implementation uses |
Looks like it's implemented (in syscall_windows.go) in golang 1.5. We have asked the broader community for some help. Here's the thread. https://groups.google.com/forum/#!topic/golang-nuts/p-H5ODtTXIw |
Tested on Windows 8.1 and Windows 7 with both VS and IntelliJ. If the IDE gets killed, gauge daemon is also terminated within 1 second. |
From @sriv on October 28, 2014 6:42
If Visual Studio is killed or crashes, the child
gauge
processes are orphaned. These need to be killed.Copied from original issue: getgauge/gauge-visualstudio#1
The text was updated successfully, but these errors were encountered: