nmh-workers
[Top] [All Lists]

Re: [nmh-workers] closefds() _before_ fork?

2019-04-23 09:58:01
they called getdtablesize() on Linux, which it seems returns a smaller
number than getrlimit().

That's surprising.  I thought getdtablesize() was effectively

    return getrlimit(RLIMIT_NOFILE, &ru) < 0 ? OPEN_MAX : ru.rlim_cur;

Hey, I don't make the news, I just report it.  If you look at the
bug fix referenced in that thread, the "fix" was to make sure that Linux
wasn't detected as SVR4.  That makes it so it calls getdtablesize() instead
of getrlimit().  My understanding of getdtablesize() matches yours, but
I can't see how that "fix" could make this problem better otherwise.

--Ken

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>