-
Notifications
You must be signed in to change notification settings - Fork 43
Use process.kill instead of process manager killPid #303
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
base: main
Are you sure you want to change the base?
Conversation
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with |
|
@gspencergoog I looked at the implementation and it just calls |
|
Fwiw, are you sure flutter isn't expecting two sigterm signals in order to shut down? |
| 'TimeoutException', | ||
| ]), | ||
| ); | ||
| test.expect(mockProcessManager.killedPids, [processPid]); |
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 should be able to look for the mocked processes here and then check if they were killed
|
I agree with all of that... except it still doesn't kill the app even with |
|
When I do a |
|
It works just fine on macOS, even with using the process manager to kill it. |
acc5271 to
e1f66f7
Compare
|
Okay, this works, but I'm not sure if it's too much of a hack. It should work on all the Linux systems that Flutter supports. |
|
|
I thought about that, but it doesn't listen to stdin with |
|
Looks like it actually supports a whole protocol, so we can send a shutdown message? We may actually want to consider running using |
Oooh, yeah, that's probably the right call. Okay, I'll look at that. |
Description
In my last change, I had switched to
processManager.killPid(process.pid)to kill a process because it was easier to test, but that doesn't appear to actually work. It works fine in tests, which is why I didn't catch it, but it doesn't actually kill the process in the real app.Seems like a bug in
ProcessManager, but maybe there's something subtle happening here. In any case, this now kills processes properly.Tests
process.kill()was called...