Well, it's an infinite loop by design. But it goes into high CPU use because FF does not handle the POLLERR case, proceeds to the next iteration right away, calling poll() again which immediately returns again with the same POLLERR.