Skip to content

replace select() with a call able to handle >1024 filedescriptors #278

@tabascoeye

Description

@tabascoeye

In this line:

if (select((int)SELECT_FD(sock->fd), NULL, &fdset,
a posix select() call is used.
This is limited to handle a maxmium of 1024 filedescriptors in a system (overall, not only in that specific call!).

Depending on the system, this is not limited to sockets, but simple files as well.
If the select() is then called wth an fd where the id is above 1024, the behavior is undefined, in most cases it just fails.

==> please replace this by e.g. poll() or other more modern mechanism for the scheme

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions