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