Re: [RFC PATCH] _rpc_dtablesize: Decrease the value of size.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26 Oct 2023, at 09:08, Benjamin Coddington wrote:

> This issue has already been addressed by several users of rpc_dtablesize(), and they typically follow this pattern:
>
>     setsize = _rpc_dtablesize();
>     if (setsize > FD_SETSIZE)
>         setsize = FD_SETSIZE;
>
> Does it make sense to attempt a universal fix, and should we consider streamlining this approach for all users?

I apologize for not initially recognizing that some users have already dealt with this issue. Nevertheless, I believe it's essential to modify the _rpc_dtablesize() function as follows:

        if (size == 0) {
                size = sysconf(_SC_OPEN_MAX);
                if (size > FD_SETSIZE)
                        size = FD_SETSIZE;
        }

I will work on cleaning up the existing code in the next version.




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux