static void    connect_alarm(int);

int connect_timeo(int sockfd, const SA *saptr, socklen_t salen, int nsec)
{
Sigfunc *sigfunc;
int n; sigfunc = signal(SIGALRM, connect_alarm);
if (alarm(nsec) != )
err_msg("connect_timeo: alarm was already set"); if ( (n = connect(sockfd, saptr, salen)) < ) {
close(sockfd);
if (errno == EINTR)
errno = ETIMEDOUT;
}
alarm(); /* turn off the alarm */
signal(SIGALRM, sigfunc); /* restore previous signal handler */ return(n);
} static void connect_alarm(int signo)
{
return; /* just interrupt the connect() */
}

最新文章

  1. HashMap两种遍历方式的深入研究
  2. 【转】Caffe初试(四)数据层及参数
  3. Oracle的DML语言必备基础知识
  4. vconfig使用帮助
  5. 关于P,V操作理解的分析
  6. windows namedPipe 命名管道clent and server
  7. 论文阅读之 A Convex Optimization Framework for Active Learning
  8. 【CodeForces】【321E】Ciel and Gondolas
  9. 多个非同源的shared_ptr管理对象引起double free
  10. Flash设置全屏后,放到网页中显示不正常
  11. JAVA_SE复习(Class)
  12. Android Wear 数据类型和接口的发送和同步数据概述
  13. 【转】linux建立软链接
  14. c# 错误 两个输出文件名解析为同一个输出路径
  15. height:auto 火狐没边框
  16. oracle 12c centos 7 安装配置
  17. mybatis foreach报错It was either not specified and/or could not be found for the javaType Type handler
  18. [PHP]算法- 二叉树的深度的PHP实现
  19. 实现Qemu aarch32虚拟开发板ping www.baidu.com
  20. react 首页加载loading

热门文章

  1. loadrunner关联及web_reg_save_param方法浅析
  2. MongoDB Change Stream:简介、尝试与应用
  3. PS教您与粗壮的胳膊拜拜
  4. Centos查看tomcat状态及操作
  5. 软件工程(FZU2015) 赛季得分榜,第四回合
  6. 数据分析之Pandas
  7. 设置 sql_mode
  8. 自用windows小软件
  9. 【51NOD1965】奇怪的式子 min_25筛
  10. 2.5 time 模块