[prev in list] [next in list] [prev in thread] [next in thread] 

List:       osdl-lsb-discuss
Subject:    [lsb-discuss] missing interface (getdtablesize)
From:       Robert.Schweikert () abaqus ! com (Robert Schweikert)
Date:       2006-07-25 20:34:37
Message-ID: 1153859677.2318.34.camel () cheetah ! abaqus ! com
[Download RAW message or body]

Mats,

Thanks, I'll keep this in mind. My comments about 3rd party code w.r.t.
licensing for the "network interfaces" applies here as well.
Implementing this in an libLSBcompat.so is of course an option. Although
I'd prefer not to get in this habit.


On Tue, 2006-07-25 at 12:03 -0700, Wichmann, Mats D wrote:
> >Can we get the interface getdtablesize into the LSB?
> 
> This one has a trivial workaround, which is to use
> getrlimit. In fact, the glibc function is even 
> implemented using getrlimit, the following should work:
> 
> int
> getdtablesize (void)
> {
>   struct rlimit ru;
> 
>   return getrlimit (RLIMIT_NOFILE, &ru) < 0 ? OPEN_MAX : ru.rlim_cur;
> }
> 
-- 
Robert Schweikert                   MAY THE SOURCE BE WITH YOU
(Robert.Schweikert at abaqus.com)                 LINUX
ABAQUS Inc.
Phone : 401-276-7190
FAX : 401-276-4408


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic