怎么让poll函数永久阻塞

如何让poll函数永久阻塞
函数
int   poll(struct   pollfd   *   fds,   int   numfds,   int   timeout);
其中timeout是设置超时时间量,如果设置为0,则poll函数不阻塞,
但是如何让他一直阻塞不超时,直到其中的fds满足条件,timeout   应当设置为何值?


timeout 用INFTIM
If timeout is neither zero nor INFTIM (-1), it specifies a maximum inter-
val to wait for any file descriptor to become ready, in milliseconds. If
timeout is INFTIM (-1), the poll blocks indefinitely. If timeout is
zero, then poll() will return without blocking.

怎么让poll函数永久阻塞

相关文章:

你感兴趣的文章:

标签云: