Skip to content

Processes started with bash file flutter/bin/dart do not terminate children processes when killed #98435

@kenzieschmoll

Description

@kenzieschmoll

which dart on my machine points to path/to/flutter/bin/dart. I was writing a test in DDS and attempting to start a process:

final process = await Process.start('dart', args);

Since dart points to flutter/bin/dart, this actually starts a bash process, not a dart process. Later in my code, I attempted to kill this process: process.kill(); and was checking that other parts of the ecosystem responded accordingly to the process being killed (specifically, I was verifying that DevTools would disconnect). Calling process.kill() killed the bash process, but not any subprocesses that were started by the bash process (i.e. the dart process that DevTools should be responding to). I expect any user who points their Dart to flutter/bin/dart and is trying to spawn a process will hit this issue.

@bkonyi and I spent time debugging this this morning. Please add any additional details or thoughts.

Metadata

Metadata

Labels

r: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions