[lkml]   [1996]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: File Descriptors & Linux 2.0
    In article <>,
    H. Peter Anvin <> wrote:
    >By author: David Schwartz <>
    >> It used to be that under 1.3.65 through about 1.3.78 you could go
    >> up to 1024 fd's per process by chaning NR_OPEN, NR_FILE, FD_SETSIZE, and
    >> a few other little things. That doesn't seem to work on 2.0.0.
    >"A few other little things" meaning recompiling libc and all your

    I just checked the Linux-2.0.0 kernel and the sys_select function never
    writes further in your fd_set than the nr_fds argument to select(). This
    means that if NR_OPEN is increased, and the size of fd_set increases with it,
    it doesn't have consequences for older applications. The only thing is that
    an old application can't handle a fd > 255 in a select() if one is passed
    through fork()/exec() but I know of no applications that do this. So I think
    you can do this without trouble.

    If it's the other way around, and you try to pass a nr_fds > NR_OPEN to
    select() the kernel sys_select function will round it down to NR_OPEN
    quietly. So that doesn't cause trouble either.

    Somehow I get the feeling that sys_select() was coded with this already
    in mind..

    Miquel van | Cistron Internet Services -- Alphen aan den Rijn.
    Smoorenburg, | | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)

     \ /
      Last update: 2005-03-22 13:37    [W:0.020 / U:5.768 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site