stream: fix infinite select() polling on osx

Interruption FD buffer should be emptied after write, otherwise select()
loop will poll indefinitely.