Graceful recovery from IOError 32 (broken pipe).

This happens when whatever is consuming from the pipe closes. This
functionality is for writing to named pipes.