os: missing conversion of internal/poll.ErrFileClosing to fs.ErrClosed in os.File.Stat() #66665
Labels
FixPending
Issues that have a fix which has not yet been reviewed or submitted.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Go version
go 1.21.8 linux/amd64
Output of
go env
in your module/workspace:What did you do?
The following program tries to catch an
os.ErrClosed
errorhttps://go.dev/play/p/3fsVnPZCdo5
What did you see happen?
The
PathError
returned is not recognized as anos.ErrClosed
and wraps an internal errorinternal/poll.ErrFileClosing
What did you expect to see?
I expected a Stat() on a closed file would return
os.ErrClosed
/fs.ErrClosed
I think this might be similar to #58622; I'm trying to catch File closed errors from fileObj.Stat() and I can't import
internal/poll.ErrFileClosing
The text was updated successfully, but these errors were encountered: