]> Cypherpunks repositories - gostls13.git/commit
os: consistently return ErrClosed for closed file
authorIan Lance Taylor <iant@golang.org>
Wed, 26 Apr 2017 00:47:34 +0000 (17:47 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 26 Apr 2017 02:54:59 +0000 (02:54 +0000)
commite3d7ec006f25385972c89f771d5d577adce3f024
treedd89889ddb9764ee696bbb532a5a7436740d7b3a
parent502a03ffcfe488f5c774794e6224e711b064fdf3
os: consistently return ErrClosed for closed file

Catch all the cases where a file operation might return ErrFileClosing,
and convert to ErrClosed. Use a new method for the conversion, which
permits us to remove some KeepAlive calls.

Change-Id: I584178f297efe6cb86f3090b2341091b412f1041
Reviewed-on: https://go-review.googlesource.com/41793
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/file.go
src/os/file_posix.go
src/os/file_unix.go
src/os/file_windows.go
src/os/os_test.go
src/os/pipe_test.go