Unix Programming - open file limits/ perl (was: fork/exec vs system)

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2007 > open file limits/ perl (was: fork/exec vs system)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author open file limits/ perl (was: fork/exec vs system)
Rainer Weikusat

2007-01-26, 7:20 am

jt@toerring.de (Jens Thoms Toerring) writes:
> Connie <yeconnie@gmail.com> wrote:
>
> How do you determine the upper limit in C and Perl? There are soft
> and hard (per-process) limits and system-wide versus per-process
> limits - are you sure you're asking for the same thing in C and Perl?
> 1024 looks like it could be the value for the per-process limit while
> 10371 might be the system-wide limit.


It's weirder than that: On the system where I tried (Debian Stable/
Linux 2.6.20-rc3), the first script below prints 1024 after having
done a getrlimit-call and the second 131072, apparently pulling
the number out of some hat.

---------------
use POSIX;

printf "%s\n", POSIX::sysconf(POSIX::_SC_OPEN_MAX);
---------------

---------------
use POSIX qw(sysconf);

printf "%s\n", POSIX::sysconf(POSIX::_SC_OPEN_MAX);
---------------
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com