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

This is the activity on fd 35 from an strace before it goes into a select loop:

socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 35
fcntl(35, F_SETFD, FD_CLOEXEC)          = 0
getsockopt(35, SOL_SOCKET, SO_SNDBUF, [150323871744], [4]) = 0
getsockopt(35, SOL_SOCKET, SO_RCVBUF, [150323942740], [4]) = 0
fcntl(35, F_GETFL)                      = 0x2 (flags O_RDWR)
fcntl(35, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
connect(35, {sa_family=AF_INET, sin_port=htons(2080), sin_addr=inet_addr("10.223
.234.72")}, 16) = -1 EINPROGRESS (Operation now in progress)
fcntl(35, F_GETFL)                      = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(35, F_SETFL, O_RDWR|O_NONBLOCK)   = 0

everything after that touching fd35 is a select returning 35 as writable