accept sigalrm

http://www.madore.org/~david/computers/connect-intr.html

 

 

int   flags   =   fcntl(socket,   F_GETFL,   0);
fcntl(socket,   F_SETFL,   flags   |   O_NONBLOCK);

你可能感兴趣的:(socket)