Content-Length: 295112 | pFad | https://github.com/flutter/flutter/issues/59338

D9 Limit calls to exit() · Issue #59338 · flutter/flutter · GitHub
Skip to content

Limit calls to exit() #59338

@zanderso

Description

@zanderso

The Flutter CLI doesn't call exit() from many places today:

https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/runner.dart#L256
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/base/signals.dart#L144

But if it were to start calling exit() from more places, various hard-to-find/racy shutdown inconsistencies could potentially crop up. See the discussion here:

#58474 (comment)

After removing the call to exit() here:

https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/commands/analyze_continuously.dart#L182

Calls to exit() could be limited using a forbidden_import_test after moving exit() from io.dart to, e.g. exit.dart.

/cc @jamesderlin @jonahwilliams

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.c: flakeTests that sometimes, but not always, incorrectly passteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/flutter/flutter/issues/59338

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy