Set socket option SO_NOSIGPIPE