http://bugzilla.suse.com/show_bug.cgi?id=1165351 http://bugzilla.suse.com/show_bug.cgi?id=1165351#c16 --- Comment #16 from Franck Bui <fbui@suse.com> --- (In reply to Thomas Blume from comment #15)
return (tbsize = (int)rl.rlim_max);
seems to be a bit excessive. But I'm not sure how else to determine a good value. Thorsten, would be changing this to the soft limit appropriate, e.g:
return (tbsize = (int)rl.rlim_cur);
?
Indeed that was my thinking too and it's actually how glibc implements getdtablesize(3). It looks like there might be a bug here therefore I would suggest to send a patch upstream that make the code use the soft limit. But that won't be sufficient unfortunately because PID1 initializes the rlimits of its child *after* calling initgroups(3). Therefore the soft limit will still be the one used by PID1 which is still equal to the hard limit. I'll send a patch to upstream to attempt to fix it. -- You are receiving this mail because: You are on the CC list for the bug.