title: POSIX select Never Returns Positive
body: <p><code>select</code> never returns when calling it with a UNIX Domain Socket server after a client connects.</p>
  
  <p>My code, without error checking and safety for clarity:</p>
  
  <p>Server:</p>
  
  <pre><code>int socketServer = socket(AF_UNIX, SOCK_STREAM, 0);
  struct sockaddr_un address;
  address.sun_family = AF_UNIX;
  strcpy(address.sun_path, "/tmp/unixdomainsocket");
  bind(socketServer, (struct sockaddr*)&amp;address, sizeof(struct sockaddr_un));
  listen(socketServer, 5);
  
  fd_set handleSet;
  FD_ZERO(&amp;handleSet);
  FD_SET(socketServer, &amp;handleSet);
  
  struct timeval timeout;
  timeout.tv_sec = 0;
  timeout.tv_usec = 10000000;
  
  printf("%d\n", select(1, &amp;handleSet, NULL, NULL, &amp;timeout));
  
  close(socketServer);
  unlink("/tmp/unixdomainsocket");
  </code></pre>
  
  <p>client:</p>
  
  <pre><code>echo "Hello from the borne again shell! | nc -U /tmp/unixdomainsocket
  </code></pre>
  
  <p>What can I do to fix this problem? The examples I found say this should work, but the documentation just says that is for reading. When I try using the handle set for the fourth parameter it still does not return true.</p>
  
  <p>When the shell connects to the server the server and client just wait for the timeout and then quit.</p>