After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796227 - [PATCH] fdwalk: use rlim_cur not rlim_max
[PATCH] fdwalk: use rlim_cur not rlim_max
Status: RESOLVED INVALID
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2018-05-18 00:23 UTC by kir
Modified: 2018-05-18 00:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description kir 2018-05-18 00:23:14 UTC
The current limit on number of open files, as returned by getrlimit,
is in rlim_cur (and rlim_max is the ceiling for rlim_cur, i.e. how
much it can be raised).
    
This should improve performance of g_spawn_*() in (a practically
pretty rare) case when /proc is not available.
Comment 1 kir 2018-05-18 00:42:38 UTC
On a second thought, I think that the following scenario is possible:

 - open many fds
 - lower the rlim_current
 - call fdwalk()

and in this case some fds might be left out. Ergo my patch is wrong.