summaryrefslogtreecommitdiff
path: root/pod
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
commit56ff2b530a2a1844b155e847352ffaed83faaa97 (patch)
treeab9d7e8e50e429c3fc56a5f01f477c00987498e0 /pod
parent30ed7742651b38c6711bbc03c61a8cafe3675b17 (diff)
downloadperl-56ff2b530a2a1844b155e847352ffaed83faaa97.tar.gz
add caveat about close(PIPE) carelessness
p4raw-id: //depot/perl@3465
Diffstat (limited to 'pod')
-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