On 3/31/25 19:55, lufei wrote:
Set maximum file descriptor number limit by rlimit.rlim_max than nr_open(hard limit). Hard limit may cause dup2 fail.
Signed-off-by: lufei lufei@uniontech.com
Petr, Al,
Okay to take this patch?
LGTM, hopefully I haven't overlook anything.
Reviewed-by: Petr Vorel pvorel@suse.cz
FYI Cyril Hrubis suggested a different approach (for LTP tests which is based on this Al's test):
https://lore.kernel.org/ltp/Z-u7yYJpTBG8Hi6A@yuki.lan/ https://lore.kernel.org/ltp/Z-vwYZxLms8juTjX@yuki.lan/
filedescriptor that is >= 64 and set the nr_open to 64.
That would help to avoid using /proc/sys/fs/nr_open.
Kind regards, Petr
thanks, -- Shuah