-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
fix(Launcher): killing a process can throw #2102
Conversation
... if the target pid does not exist.
@thorn0 can you please make |
@aslushnikov done |
I was initially positive about this change, but now I'm scared we might be killing some other process. Looks like we're covering the actual problem instead of solving it properly. @JoelEinbinder, what do you think about this patch? |
That seems like a valid concern. Do we get a disconnected event synchronously on our websocket? Maybe we can use that to avoid killing someone else's process with the same id. It is weird that we don't get a |
At least on Windows, the exception occurs only when there is no process with the specified PID. That's the situation the proposed change fixes. I easily reproduce it killing Chromium manually. If, as you're afraid, it kills some other process with the same reused PID, it won't throw. So I don't see how this change "covers the actual problem". |
I'm afraid we might be killing some other process, if the pid of the chrome process gets re-used after its manual termination. However, since this is highly unlikely and there's no easy way around, I'll merge this in. |
... if the target pid does not exist.