diff options
author | Chip Salzenberg <chip@atlantic.net> | 1997-04-30 00:00:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-30 00:00:00 +1200 |
commit | 03136e130d992186c97de0acd23f4857b1a277da (patch) | |
tree | d949f1f3a199a60e1e0ec5416f9118e7cd259f91 /pod | |
parent | cf26c822ca0e58de393c90b3f7a75af4335d0d65 (diff) | |
download | perl-03136e130d992186c97de0acd23f4857b1a277da.tar.gz |
Reset errno after failed piped close
(this is the same change as commit 00db273fa22ecba6466df777a772c6017c403a96, but as applied)
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlfunc.pod | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index a99dffeb4d..823355b363 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -551,7 +551,11 @@ omitted, does chroot to $_. Closes the file or pipe associated with the file handle, returning TRUE only if stdio successfully flushes buffers and closes the system file -descriptor. You don't have to close FILEHANDLE if you are immediately +descriptor. If the file handle came from a piped open C<close> will +additionally return FALSE if one of the other system calls involved +fails or if the program exits with non-zero status. (If the problem was +that the program exited non-zero $! will be set to 0.) +You don't have to close FILEHANDLE if you are immediately going to do another open() on it, because open() will close it for you. (See open().) However, an explicit close on an input file resets the line counter ($.), while the implicit close done by open() does not. Also, |