KQueue almost fnished, but totally stuck on a tiny bug