LINUX,select

来源:互联网 发布:阿里云邮箱登录名忘记 编辑:程序博客网 时间:2024/06/06 07:34

       int select(int nfds, fd_set *readfds, fd_set *writefds,
                  fd_set *exceptfds, struct timeval *timeout);

       timeout  is  an  upper bound on the amount of time elapsed before select() returns.  If

       both fields of the timeval stucture are zero, then select() returns immediately.  (This

       is  useful  for  polling.)  If timeout is NULL (no timeout), select() can block indefinitely.


select阻塞超过timeout时间,就返回0。

如果timeout是0,则select直接返回0;

如果timeout是NULL,则select会阻塞,时间不确定。

<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(169) | 评论(0) | 转发(0) |
0

上一篇:X Window Programming From Scratch笔记(1

下一篇:X.509标准

相关热门文章
  • linux 常见服务端口
  • xmanager 2.0 for linux配置
  • 【ROOTFS搭建】busybox的httpd...
  • openwrt中luci学习笔记
  • 什么是shell
  • linux dhcp peizhi roc
  • 关于Unix文件的软链接
  • 求教这个命令什么意思,我是新...
  • sed -e "/grep/d" 是什么意思...
  • 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
原创粉丝点击