Chinaunix
标题:
使用select函数出现的问题:Interrupted system call
[打印本页]
作者:
netbuggao
时间:
2005-03-22 13:47
标题:
使用select函数出现的问题:Interrupted system call
使用阻塞方式时没有问题。现在想用非阻塞方式,因为主程序里还要跑别的东西。关键程序如下,跑了几秒中就提示:Select error:Interrupted system call。折腾了我几个小时:)还没搞定。
for (; ; )
{
FD_ZERO(&mask);
mask = active_fdset;
timeout.tv_sec = 0;
timeout.tv_usec = 0;
num = select(active_maxfd + 1, &mask, NULL, NULL, &timeout);
if (num < 0)
{
printf("Select error:%s", strerror(errno));
exit(1);
}
else if(num>;0)
{
。。。。。。。。。。
};
................
}
作者:
netbuggao
时间:
2005-03-22 13:50
标题:
使用select函数出现的问题:Interrupted system call
sss
作者:
netbuggao
时间:
2005-03-22 14:37
标题:
使用select函数出现的问题:Interrupted system call
alarm().
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2