Posted to tcl by evilotto at Fri Feb 03 20:02:07 GMT 2012view raw

  1. This is the activity on fd 35 from an strace before it goes into a select loop:
  2.  
  3. socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 35
  4. fcntl(35, F_SETFD, FD_CLOEXEC) = 0
  5. getsockopt(35, SOL_SOCKET, SO_SNDBUF, [150323871744], [4]) = 0
  6. getsockopt(35, SOL_SOCKET, SO_RCVBUF, [150323942740], [4]) = 0
  7. fcntl(35, F_GETFL) = 0x2 (flags O_RDWR)
  8. fcntl(35, F_SETFL, O_RDWR|O_NONBLOCK) = 0
  9. connect(35, {sa_family=AF_INET, sin_port=htons(2080), sin_addr=inet_addr("10.223
  10. .234.72")}, 16) = -1 EINPROGRESS (Operation now in progress)
  11. fcntl(35, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
  12. fcntl(35, F_SETFL, O_RDWR|O_NONBLOCK) = 0
  13.  
  14. everything after that touching fd35 is a select returning 35 as writable