dparrish / libcli

Libcli provides a shared library for including a Cisco-like command-line interface into other software. It's a telnet interface which supports command-line editing, history, authentication and callbacks for a user-definable function tree.
https://dparrish.com/link/libcli
GNU Lesser General Public License v2.1
289 stars 144 forks source link

Better to change cli_loop() to use poll(..) instead of select(..). #13

Closed vmytnyk closed 5 years ago

vmytnyk commented 11 years ago

Hi,

Using select(...) function you are not able to create more file descriptors then FD_SETSIZE define in the OS. On majority of systems it's 1024. In some cases it causes really a big trouble in applications that creates a lot of file descriptors. So, I suggest to change cli_loop() to use poll instead of select() as it allows us to create more file descriptors then select() function.

Thanks, Volodymyr