From owner-freebsd-net@FreeBSD.ORG Thu Mar 1 15:57:10 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0D0616A405 for ; Thu, 1 Mar 2007 15:57:10 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1FA13C441 for ; Thu, 1 Mar 2007 15:57:10 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 212AA5F6E; Thu, 1 Mar 2007 18:32:13 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id F25315DDF; Thu, 1 Mar 2007 18:32:12 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id l21FTg2O027477; Thu, 1 Mar 2007 18:29:42 +0300 (MSK) (envelope-from ru) Date: Thu, 1 Mar 2007 18:29:42 +0300 From: Ruslan Ermilov To: Anton Yuzhaninov Message-ID: <20070301152942.GA27336@rambler-co.ru> References: <2110071423.20070301151729@citrin.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline In-Reply-To: <2110071423.20070301151729@citrin.ru> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: freebsd-net@freebsd.org Subject: Re: is setsockopt SO_NOSIGPIPE work? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2007 15:57:10 -0000 --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--