linux select 返回值

  IBM AIX上 select返回值的 man

  if  a connect-based socket is specified in the readlist parameter and the connection  disconnects,

  the select subroutine returns successfully,but the recv subroutine on the socket will return a value of 0

  to indicate the socket connection has been closed

  也就是说 监听前或者 监听中  。socket连接 断开了,那么select返回正确。并且 recv返回0,

  来 指明  连接 断开了。

  所以 网上 那么博文 说的 返回值是可操作 文件描述符 个数。。仅仅 针对 linux 是对的。。~~

  只有 man,你 值得拥有。

  不得不说。linux和 UNIX 研究得越细,使用得越多,你才能发现,他们差别 太大。

  

原文地址:https://www.cnblogs.com/deityde1127/p/3443909.html