Treat ERROR_BROKEN_PIPE as end-of-file instead of an error