diff --git a/src/os/file_plan9.go b/src/os/file_plan9.go index 74c377127d..e4f8fd987b 100644 --- a/src/os/file_plan9.go +++ b/src/os/file_plan9.go @@ -29,6 +29,7 @@ type file struct { // Fd returns the integer Plan 9 file descriptor referencing the open file. // The file descriptor is valid only until f.Close is called or f is garbage collected. +// On Unix systems this will cause the SetDeadline methods to stop working. func (f *File) Fd() uintptr { if f == nil { return ^(uintptr(0)) diff --git a/src/os/file_unix.go b/src/os/file_unix.go index 84a2bb5f00..b834f52589 100644 --- a/src/os/file_unix.go +++ b/src/os/file_unix.go @@ -54,6 +54,7 @@ type file struct { // Fd returns the integer Unix file descriptor referencing the open file. // The file descriptor is valid only until f.Close is called or f is garbage collected. +// On Unix systems this will cause the SetDeadline methods to stop working. func (f *File) Fd() uintptr { if f == nil { return ^(uintptr(0)) diff --git a/src/os/file_windows.go b/src/os/file_windows.go index c8307a6d22..81a0ab7346 100644 --- a/src/os/file_windows.go +++ b/src/os/file_windows.go @@ -25,6 +25,7 @@ type file struct { // Fd returns the Windows handle referencing the open file. // The handle is valid only until f.Close is called or f is garbage collected. +// On Unix systems this will cause the SetDeadline methods to stop working. func (file *File) Fd() uintptr { if file == nil { return uintptr(syscall.InvalidHandle)