Ahh, sorry, I knew I was going to forget something: the write() and flush() aren't blocking or throwing errors; the code just goes on its merry way.