Date: Thu, 1 Mar 2007 18:29:42 +0300 From: Ruslan Ermilov <ru@freebsd.org> To: Anton Yuzhaninov <citrin@citrin.ru> Cc: freebsd-net@freebsd.org Subject: Re: is setsockopt SO_NOSIGPIPE work? Message-ID: <20070301152942.GA27336@rambler-co.ru> In-Reply-To: <2110071423.20070301151729@citrin.ru> References: <2110071423.20070301151729@citrin.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Anton, On Thu, Mar 01, 2007 at 03:17:29PM +0300, Anton Yuzhaninov wrote: > Hello. >=20 > Is SO_NOSIGPIPE work? >=20 > It try to set on socket option SO_NOSIGPIPE but anyway process > received sigpipe. >=20 It works, but only if you use send() instead of write(). Alternatively, you can control the behavior on a per message basis, by passing the MSG_NOSIGNAL in the "flags" argument to the send() call (without having to set a socket option). Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --5vNYLRcllDrimb99 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.2 (FreeBSD) iD8DBQFF5vFmqRfpzJluFF4RAqvzAJ4wrnjeCo1hcSgl4iQA95sMa1aSYwCeJndi JbDSkxbHqzViAfULxJFzzP0= =nPbM -----END PGP SIGNATURE----- --5vNYLRcllDrimb99--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070301152942.GA27336>