Per POSIX, the shutdown(2) system call can fail with EBADF, EINVAL,
ENOTSOCK, and ENOTCONN. Of these, the first three should never occur
in spiped -- they indicate that we somehow got confused about file
descriptors and we should terminate. ENOTCONN is harmless at this
point since it indicates that a connection has been closed where we
no longer wanted to send any traffic anyway.
But POSIX does not prohibit other error codes from being returned;
and FreeBSD returns ECONNRESET upon attempting to shutdown a closed
TCP connection. Accept this as harmless as well; and treat any other
errors as being fatal *for this pipe* but do not abort spiped.