Check the result of g_poll and exit if an error is detected.