FIX: deadlock in linux event polling