From owner-freebsd-arch@FreeBSD.ORG Fri Dec 30 13:12:32 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D39F106566C; Fri, 30 Dec 2011 13:12:32 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 270598FC08; Fri, 30 Dec 2011 13:12:31 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id D03626172; Fri, 30 Dec 2011 13:12:29 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 78B258822; Fri, 30 Dec 2011 14:12:29 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Xin LI References: <20111229084308.GD50300@deviant.kiev.zoral.com.ua> <20111229113829.GF50300@deviant.kiev.zoral.com.ua> Date: Fri, 30 Dec 2011 14:12:29 +0100 In-Reply-To: (Xin LI's message of "Thu, 29 Dec 2011 10:20:41 -0800") Message-ID: <867h1enqyq.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , arch@freebsd.org, kan@freebsd.org Subject: Re: fdlopen(3) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 13:12:32 -0000 Xin LI writes: > Kostik Belousov writes: > > Xin LI writes: > > > Will this prevent e.g. writes to the .so file after open, but > > > before fdlopen()? > > How can it ? Even in theory ? > e.g. process 1 open(), check for permissions, etc., then process 2 > open() for write, write something, then process proceed with > fdlopen()? (We do not have mandatory "lock" on file handles to > prevent writing I think?). I think Kostik meant "how could you, even in theory, prevent this from happening", and the answer is that you can't. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no