-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perl incorrectly limits maxmimum number of open files #893
Comments
From jklein@eden.alerts.co.ilI'm working on a Solaris machine, and using ulimit, I upped the maximum Okay, I thought "Perl open() is based on C's fopen() which only supports So I tried FileHandle and found that it also failed above 256; I can live With supreme confidence, I decided to run the test with sysopen. Imagine This seems to me to be a major bug. I searched the archives and looked PS I ran my program using truss and verified that the system call open()s Below is the program that I used to test this. The 3 open() lines are Any help would be greatly appreciated, --------------------- #!/usr/local/bin/perl use FileHandle; $i = 0; #$rc = open ($fd, "<$fname"); #$rc = ($ffh[$i] = new FileHandle)->open($fname, "r"); #$rc = sysopen($fd, $fname, O_RDONLY); if (!$rc) $i++; Perl Info
|
From @chipdudeAccording to Yossi Klein:
Perhaps it's not Perl's fault. Perhaps your C library's fopen() and |
From [Unknown Contact. See original ticket]I know that fopen and fdopen don't support fds higher than 255; that's a Yossi On Wed, 24 Nov 1999, Chip Salzenberg wrote:
|
From @chipdudeAccording to Yossi Klein:
But it then proceeds to call fdopen(). I'm quite sure of that. If you need more files open than 256, I suggest you (1) install and |
From [Unknown Contact. See original ticket]Well in that case... But, I still think that it's at least a documentation bug. There's nowhere By the way, part of the problem I hit is that the EventServer.pm module Personally, I still think that it's a bug that sysopen() relies on Yossi On Wed, 24 Nov 1999, Chip Salzenberg wrote:
|
From [Unknown Contact. See original ticket]Chip Salzenberg <chip@valinux.com> writes:
You have to use open() directly to access fds higher than 255 on Solaris, -- |
From @chipdudeAccording to Yossi Klein:
You're right, that should be documented. Would you please suggests a
But there is a way around it. Just start using sfio, like I |
From [Unknown Contact. See original ticket]On Wed, 24 Nov 1999, Chip Salzenberg wrote:
I'm not eloquent, but how about something like: Please note that that sysopen relies on the fdopen() C library call.
I've been working in C so long that I don't even think of this as a bug, Thanks for your valuable feedback. Yossi Klein |
From @chipdudeAccording to Yossi Klein:
Consider it added. Thanks. (BTW, sfio is a library, so its name
A feature is often a bug with seniority. :-(
It might, but I suggest scalar(POSIX::fstat($fd)) . Simpler to use.
My pleasure. |
From [Unknown Contact. See original ticket]Yossi Klein <jklein@eden.alerts.co.il> writes:
That is because sysopen() still needs a FILE * (when PerlIO == stdio) -- |
From [Unknown Contact. See original ticket]On Thu, Nov 25, 1999 at 09:45:56AM +0200, jklein@eden.alerts.co.il wrote:
You're using EventServer.pm? Last time I checked, that modules was Hope this helps. -- |
Migrated from rt.perl.org#1826 (status was 'resolved')
Searchable as RT1826$
The text was updated successfully, but these errors were encountered: