Add support for use of select() or poll() for waiting on multiple devices.