some kqueue logic changes, now input stream is flushed from kqueue when eof was found