From: Jarkko Hietaniemi Date: Tue, 19 Jun 2001 18:07:31 +0000 (+0000) Subject: Furthwer tweak the fdopen() spot as suggseted by Jeff Pinyan; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df632fdf5edfd99b849ad6dce949e138176769a4;p=p5sagit%2Fp5-mst-13.2.git Furthwer tweak the fdopen() spot as suggseted by Jeff Pinyan; also add information how to find out whether one has PerlIO. p4raw-id: //depot/perl@10727 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 464d7e0..67c305c 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -2812,19 +2812,25 @@ STDERR: print STDOUT "stdout 2\n"; print STDERR "stderr 2\n"; -If you specify C<< '<&=N' >>, where C is a number, then Perl will do an -equivalent of C's C of that file descriptor; this is more -parsimonious of file descriptors. For example: +If you specify C<< '<&=N' >>, where C is a number, then Perl will +do an equivalent of C's C of that file descriptor; this is +more parsimonious of file descriptors. For example: open(FILEHANDLE, "<&=$fd") + or + open(FILEHANDLE, "<&=", $fd) -Note that if perl is using the standard C libraries fdopen() then on many UNIX systems, -fdopen() is known to fail when file descriptors +Note that if Perl is using the standard C libraries' fdopen() then on +many UNIX systems, fdopen() is known to fail when file descriptors exceed a certain value, typically 255. If you need more file descriptors than that, consider rebuilding Perl to use the C. +You can see whether Perl has been compiled with PerlIO or not by +running C and looking for C line. If C +is C, you have PerlIO, otherwise you don't. + If you open a pipe on the command C<'-'>, i.e., either C<'|-'> or C<'-|'> with 2-arguments (or 1-argument) form of open(), then there is an implicit fork done, and the return value of open is the pid