summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-25 02:24:08 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-25 02:24:08 +0000
commit73689b13b10ea0db5604b4177ed9d72f782990d1 (patch)
treeab9d7e8e50e429c3fc56a5f01f477c00987498e0
parent2ebea0a13aa2cfad039eedf2ae4b124fbb89d415 (diff)
downloadperl-73689b13b10ea0db5604b4177ed9d72f782990d1.tar.gz
add caveat about close(PIPE) carelessness
p4raw-id: //depot/perl@3465
-rw-r--r--pod/perlfunc.pod5
1 files changed, 5 insertions, 0 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 650493a93e..ed3de62a23 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -694,6 +694,11 @@ also waits for the process executing on the pipe to complete, in case you
want to look at the output of the pipe afterwards, and
implicitly puts the exit status value of that command into C<$?>.
+Prematurely closing the read end of a pipe (i.e. before the process
+writing to it at the other end has closed it) will result in a
+SIGPIPE being delivered to the writer. If the other end can't
+handle that, be sure to read all the data before closing the pipe.
+
Example:
open(OUTPUT, '|sort >foo') # pipe to sort