From: Chip Salzenberg Date: Fri, 19 Nov 1999 21:16:00 +0000 (+0000) Subject: Document known limitations of fdopen() on some systems, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4af147f6b0134a663b2bfe1fed9228e3449b7553;p=p5sagit%2Fp5-mst-13.2.git Document known limitations of fdopen() on some systems, as they apply to open() and sysopen(). p4raw-id: //depot/perl@4600 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 088f1dd..3497ca9 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -2602,6 +2602,12 @@ parsimonious of file descriptors. For example: open(FILEHANDLE, "<&=$fd") +Note that this feature depends on the fdopen() C library function. +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 +library. + 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 @@ -4528,8 +4534,7 @@ For historical reasons, some values work on almost every system supported by perl: zero means read-only, one means write-only, and two means read/write. We know that these values do I work under OS/390 & VM/ESA Unix and on the Macintosh; you probably don't want to -se them in new code, use thhe constants discussed in the preceding -paragraph. +use them in new code. If the file named by FILENAME does not exist and the C call creates it (typically because MODE includes the C flag), then the value of @@ -4550,6 +4555,12 @@ that takes away the user's option to have a more permissive umask. Better to omit it. See the perlfunc(1) entry on C for more on this. +Note that C depends on the fdopen() C library function. +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 +library, or perhaps using the POSIX::open() function. + See L for a kinder, gentler explanation of opening files. =item sysread FILEHANDLE,SCALAR,LENGTH,OFFSET