lkml.org 
[lkml]   [1999]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: NR_OPEN vs OPEN_MAX vs RLIMIT_NOFILE, and a glibc bug?
    Date
    On Sat, 27 Mar 1999 11:44:41 GMT, Olaf Titz <olaf@bigred.inka.de> wrote:

    >This implies that the common usage of getdtablesize() to find out the
    >highest numbered fd is wrong to begin with, since a process could open
    >(or inherit!) a fd and subsequently lower RLIMIT_NOFILE. It also
    >suggests it is not possible to find out the highest numbered fd at
    >all. (And using the _soft_ limit makes it sounds yet more questionable
    >IMHO.)

    AIX has a nice fcntl to close all file descriptors above and including a
    the given fd value, e.g fcntl(3, F_CLOSEM, 0) would close fd 3 and up.

    --
    Jens-Uwe Mager <pgp-mailto:62CFDB25>

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:51    [from the cache]
    ©2003-2014 Jasper Spaans. hosted at Digital Ocean