use poll instead of select in TSocket
authorDavid Reiss <dreiss@apache.org>
Tue, 8 Apr 2008 06:25:45 +0000 (06:25 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 8 Apr 2008 06:25:45 +0000 (06:25 +0000)
commit22b1886dc7e4069e8cf838ebf7816a7ab697d091
treeebb1b2f7cf9861536ad836ee647253651247cf9f
parent1ffb61beaafedb160a971732e599d5c6aa67a646
use poll instead of select in TSocket

Summary: fd_set, which we pass into select only supports  fds with values < 1024.
         fds can be >= 1024.
         this can cause memory corruption

         learning this stuff over 2 weeks of examining crazy core dumps is way more fun that reading it up somewhere.

         poll takes an array of fds insetad, so your fd can be any int

Reviewed By: dreiss

Test Plan: ran inside a test search cluster

Revert: OK

DiffCamp Revision: 10731

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665647 13f79535-47bb-0310-9956-ffa450edef68
lib/cpp/src/transport/TSocket.cpp