Skip to content

[CP] catch StdinException when STDIN pipe is broken #138040

@christopherfujino

Description

@christopherfujino

Issue Link

#129198

Commit Hash

b416473

Target

beta

PR Link

#138032

Changelog Description

Ignore exceptions when trying to set the echo mode of the terminal when the STDIN pipe has been broken.

Impacted Users

flutter developers who use flutter run ...

Impact Description

I'm not sure the exact way users get in this situation, but it is our top tool crasher. Somehow, users are triggering flutter run, but when the tool attempts to modify the STDIN file descriptors echo mode, it reaches an exception that the STDIN pipe has been broken.

Without this fix, the tool will crash and the app will not be run. With this fix, the tool will continue launching the app, without modifying the STDIN echo mode (which shouldn't matter since there's no longer anything attached to STDIN anyway).

Workaround

It's unclear to me the workaround here since I'm not sure why the STDIN pipe is being broken.

Risk

low

Test Coverage

yes

Validation Steps

Unclear to me, see "Impact Description". The unit test in the CP PR at least will verify that at the point the crash is happening we will catch StdinExceptions.

Metadata

Metadata

Assignees

Labels

cp: approvedApproved cherry-pick requestcp: reviewCherry-picks in the review queue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions