title: Functional difference between select and poll system calls in unix
body: <p>I am pretty sure people are going to be hard on this question saying it is a repeated one. But i intended to ask something specific. I faced a scenario in which a select call failed to get the handels where as poll system call could recognize the handles.</p>
  
  <p>I am not finding any soothing reason behind it.
  Let me explain the scenario-
  I was trying to get a scocket client to register to a server which was not in the same machine.
  When the client is in the same machine select system call works efficiently. But when it is not a part of the same machine it fails and poll works.</p>
  
  <p>Any general resoning behind this ?
  (Note:I am using ACE wrapper library )
  Added
  Code snippet</p>
  
  <pre><code>           int noOfHandles = 4;
              int handles[4];
  
              int result = thedserver-&gt;get_handles(handles,noOfHandles);
  
              if ((result &lt; 0 ) || (noOfHandles &lt;= 0))
              {
                      return -1;
              }
              ACE_Handle_Set dsdHandleSet;
  
              for( int i = 0 ;  i &lt; noOfHandles ; i++)
              {
                      cout &lt;&lt; "handles: " &lt;&lt; handles[i] &lt;&lt; endl;
                      dsdHandleSet.set_bit(handles[i]);
              }
              cout &lt;&lt; "noOfHandles: " &lt;&lt; noOfHandles &lt;&lt; endl;
              ACE_Time_Value tv1(60, 0);
  
              while(1)
              {
                      int res = ACE::select(dsdHandleSet.max_set() + 1, &amp;dsdHandleSet, 0, 0,&amp;tv1);
                      cout &lt;&lt; "res: " &lt;&lt; res &lt;&lt; endl;
              } 
  </code></pre>