应为POSIX标准里并没有 INFTIM, 而是用-1 If the value of timeout is -1, poll() shall block until a requested event occurs or until the call is interrupted. 所以建议直接使用-1,容易适应不同的系统。
------解决方案--------------------
------解决方案-------------------- The timeout argument specifies an upper limit on the time for which poll() will block, in milliseconds. Specifying a negative value in timeout means an infinite timeout.