Using poll()
To determine the completion of an asynchronous I/O event synchronously rather than depend on a
SIGIO interrupt, use poll(). You can
also poll to determine the origin of a SIGIO interrupt. For
more information, see the
poll(2) man page.
poll()
is slow when used on very large numbers of files. This problem is
resolved by
poll(4D).