lkml.org 
[lkml]   [2007]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD
    Date
    > I'd actually prefer this as part of the "remove OPEN_MAX" patch.

    Ok. (But now you're going to argue with me about "remove OPEN_MAX",
    and you haven't said you have any problem with changing SCM_MAX_FD,
    so why make it wait?)

    > That said, it actually worries me that you should call "_SC_OPEN_MAX".
    [...]
    > For example, I know perfectly well that I should use _SC_PATH_MAX, but a
    > *lot* of code simply doesn't care. In git, I used PATH_MAX, and the reason
    [...]

    Ok, fine. But PATH_MAX is a real constant that has some meaning in the
    kernel. It's perfectly correct to use PATH_MAX as a constant on a system
    like Linux that defines it and means what it says. Conversely, OPEN_MAX
    has no useful relationship with anything the kernel is doing at all.

    > So, what's the likelihood that this will break some old programs? I
    > realize that modern distributions don't put the kernel headers in their
    > user-visible includes any more, but the breakage is most likely exactly
    > for old programs and older distributions.

    Well, I don't know for sure. It doesn't seem all that likely to me (not
    like PATH_MAX), as there has been getdtablesize() since before there was
    OPEN_MAX by that name (not to mention before there was Linux). If things
    use OPEN_MAX as a constant for arrays, they're already broken unless they
    call setrlimit to constrain themselves. Getting things fixed has to start
    somewhere.


    Thanks,
    Roland

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

    \
     
     \ /
      Last update: 2007-03-14 01:57    [W:0.020 / U:60.204 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site