7.4. poll()

poll(struct pollfd *ufds, unsigned int nfds, int timeout). 此调用可用于检查 sg 文件描述符的状态。 它将始终立即响应。 典型的用法是定期轮询 sg 文件描述符的状态,并确定接收到 SIG_IO 信号的原因。

对于与 sg 设备关联的文件描述符

POLLOUT 指示 sg 不会阻塞新的 write() 或 SG_IO ioctl()。 但是,中间层或适配器仍然有可能(但不太可能)阻塞(或产生 EAGAIN)。