Skip to content

File::GetStdioHandleType() should distinguish between an error and an unknown type #40354

@zanderso

Description

@zanderso

File::GetStdioHandleType() is called when setting up the streams for the dart:io top-levels stdout, stderr, and stdin. It does not distinguish between an error (e.g. fstat() returning -1) and an unknown stat st_mode field. If there is an error, the resulting FileSystemException could contain the errno, strerror, etc. info.

See:

File::StdioHandleType File::GetStdioHandleType(int fd) {

It's probably a separate API usability issue that touching a top-level getter can throw an exception, but that might also warrant some attention.

@a-siva @zichangg

Metadata

Metadata

Assignees

Labels

area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-iotype-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions