gracefully handle closing the send side of a pipe for FD