Skip to content

Commit 075503b

Browse files
authored
Document .closing standard handles
will lead to inability to open them again
1 parent a75410c commit 075503b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/Type/IO/Handle.pod6

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,10 @@ Defined as:
686686
multi sub close(IO::Handle $fh)
687687
688688
Closes an open file handle. It's not an error to call C<close> on an
689-
already-closed filehandle. Returns C<True> on success.
689+
already-closed filehandle. Returns C<True> on success. If you close
690+
one of the standard file handles (by default: C<$*IN>, C<$*OUT>, or C<$*ERR>),
691+
that is any handle with L<native-descriptor> C<2> or lower, you won't be
692+
able to re-open such a handle.
690693
691694
It's a common idiom to use L«C<LEAVE> phaser|/language/phasers#LEAVE» for
692695
closing the handles, which ensures the handle is closed regardless of how the

0 commit comments

Comments
 (0)