Skip to content

Microbenchmarks process.kill() does not work #19208

@DanTup

Description

@DanTup

(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).

Metadata

Metadata

Assignees

Labels

a: tests"flutter test", flutter_test, or one of our tests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions