Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
4.8.0, 5.0.0
-
None
-
Linux and other unix variants
Description
See this crash in ktorrent:
https://bugs.kde.org/show_bug.cgi?id=294996
The crash is caused by the fact that a file descriptor larger then FD_SETSIZE is passed to one of the fdset macros used in conjunction with the select system call. The problem is that a percentage of users of ktorrent increase the maximum number of open file descriptors to something larger then 1024 on linux, to be able to connect to more peers. This can result in Qt getting file descriptors which are larger then FD_SETSIZE. Which cannot be used in the select system call.
Qt should therefore use the poll system call instead when dealing with sockets on linux and other unix variants. Poll does not suffer from the limitations of FD_SETSIZE.