os: missing conversion of internal/poll.ErrFileClosing to fs.ErrClosed #58622
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
TL;DR: Posted to go-nuts, and Ian Lance Taylor responded:
I believe they're referring to this line in
os/readfrom_linux.go
.What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Don't know.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
My code is essentially running shell pipelines, and i want to catch harmless errors where a process on the left side of the pipeline dies because the right side has finished. Think
{ echo 1; echo 2; echo 3; } | head -n1
.So in addition to catching EPIPEs and SIGPIPEs, i catch file closed errors:
What did you expect to see?
Nothing.
What did you see instead?
Code dies with the error message
write |1: copy_file_range: use of closed file
. Since this error appears to be internal/poll.ErrFileClosing, i can't catch it since i can't import the package.The text was updated successfully, but these errors were encountered: