Handle task->revents correctly (make sure they are zero when