io icon indicating copy to clipboard operation
io copied to clipboard

Setting SO_NOSIGPIPE on Socket for BSD derivatives

Open pinver opened this issue 4 years ago • 1 comments

Under macOS, for example, If the socket for whatever reason is closed, you end up in the SIGPIPE handler.

Setting the SO_NOSIGPIPE option will instruct the OS to not generate SIGPIPE, but instead return EPIPE, which can be handled gracefully along with other IO errors.

pinver avatar Jun 18 '20 14:06 pinver

I'll look into allowing this as an option.

schveiguy avatar Jul 27 '20 15:07 schveiguy