Skip to content

Commit a7c1632

Browse files
author
Father Chrysostomos
committed
perlfunc/fileno: Document the -1 retval
1 parent dbfe1e8 commit a7c1632

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pod/perlfunc.pod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,11 @@ on your own, though.
19381938
X<fileno>
19391939

19401940
Returns the file descriptor for a filehandle, or undefined if the
1941-
filehandle is not open. This is mainly useful for constructing
1941+
filehandle is not open. If there is no real file descriptor at the OS
1942+
level, as can happen with filehandles connected to memory objects via
1943+
C<open> with a reference for the third argument, -1 is returned.
1944+
1945+
This is mainly useful for constructing
19421946
bitmaps for C<select> and low-level POSIX tty-handling operations.
19431947
If FILEHANDLE is an expression, the value is taken as an indirect
19441948
filehandle, generally its name.
@@ -1950,10 +1954,6 @@ same underlying descriptor:
19501954
print "THIS and THAT are dups\n";
19511955
}
19521956

1953-
(Filehandles connected to memory objects via new features of C<open> may
1954-
return undefined even though they are open.)
1955-
1956-
19571957
=item flock FILEHANDLE,OPERATION
19581958
X<flock> X<lock> X<locking>
19591959

0 commit comments

Comments
 (0)