Use poll(2) rather than select(2).