-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
(splitting this from investigation in #19096 into a more specific issue...)
In microbenchmarks we have some code that tries to kill the flutter run process after it gets its json results:
| process.kill(ProcessSignal.SIGINT); // flutter run doesn't quit automatically |
This does not work; nothing happens (for my Mac, and on some of the CIs, at least). My suspicion is that this is because the flutter executable is a shell script, so this process is the shell and not the VM. The shell doesn't seem to pass SIGINT on to the VM correctly - this could be the same issue I wrestled with in Dart Code for a while (I originally thought it was Windows-only).
Assuming it is that, the fix in Dart Code was to read the pid of the VM process via observatory and send kill to that too. It's also possible we can kill the whole set of processes with a negative ID, but I think this may require spawning it "detached" which may introduce other issues (on Windows I think it spawns a visible console window - not important in tests, but why I couldn't do it with Dart Code).