diff options
author | Russ Cox <rsc@golang.org> | 2014-11-06 09:36:51 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-11-06 09:36:51 -0500 |
commit | c5c528a7ea701534b4e5d5590e46f69f2f893f43 (patch) | |
tree | 8282b8cc4eb8886e565ccd1bd81739f916009180 /src/os/file_plan9.go | |
parent | 87a8f70ba7cf934bf5e5f17f69f0a2203cc03563 (diff) | |
download | go-c5c528a7ea701534b4e5d5590e46f69f2f893f43.tar.gz |
os: document that users of Fd should keep f alive
Fixes issue 9046.
LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/162680043
Diffstat (limited to 'src/os/file_plan9.go')
-rw-r--r-- | src/os/file_plan9.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os/file_plan9.go b/src/os/file_plan9.go index 5efc2a4f1..132594eed 100644 --- a/src/os/file_plan9.go +++ b/src/os/file_plan9.go @@ -25,7 +25,8 @@ type file struct { dirinfo *dirInfo // nil unless directory being read } -// Fd returns the integer Unix file descriptor referencing the open file. +// 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. func (f *File) Fd() uintptr { if f == nil { return ^(uintptr(0)) |