From owner-cvs-all@FreeBSD.ORG Wed Mar 9 00:48:36 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E2AA16A4CE; Wed, 9 Mar 2005 00:48:36 +0000 (GMT) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F8B143D41; Wed, 9 Mar 2005 00:48:36 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with SMTP id 54B7446B0E; Tue, 8 Mar 2005 19:48:35 -0500 (EST) Date: Wed, 9 Mar 2005 00:46:18 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Alfred Perlstein In-Reply-To: <20050308012939.GP11079@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Maxim Sobolev cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/compat/linux linux_socket.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 00:48:36 -0000 On Mon, 7 Mar 2005, Alfred Perlstein wrote: > Why not just expand our API to do this as well? It shouldn't be that > hard and then we'll gain the additional functionality. There are some other related MSG_ flag situations we might want to look at -- for example, the dontroute -> SO_DONTROUTE logic on sosend() where adding MSG_DONTROUTE would involve racy frobbing of so_options. If we do add MSG_NOSIGNAL and other MSG_ flags, it would be nice to avoid exposing it as a valid flag to sendto/recvfrom in userspace until we decide we definitely want to expose it as part of the user API, in order to avoid applications starting to depend on the flags while the details fall out. Robert N M Watson > > * Maxim Sobolev [050306 23:26] wrote: > > sobomax 2005-03-07 07:26:43 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/compat/linux linux_socket.c > > Log: > > Handle MSG_NOSIGNAL flag in linux_send() by setting SO_NOSIGPIPE on socket > > for the duration of the send() call. Such approach may be less than ideal > > in threading environment, when several threads share the same socket and it > > might happen that several of them are calling linux_send() at the same time > > with and without SO_NOSIGPIPE set. > > > > However, such race condition is very unlikely in practice, therefore this > > change provides practical improvement compared to the previous behaviour. > > > > PR: kern/76426 > > Submitted by: Steven Hartland > > MFC after: 3 days > > > > Revision Changes Path > > 1.56 +25 -2 src/sys/compat/linux/linux_socket.c > > -- > - Alfred Perlstein > - Research Engineering Development Inc. > - email: bright@mu.org cell: 408-480-4684 >