From owner-freebsd-threads@FreeBSD.ORG Mon Oct 5 18:27:18 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76F3910656ED for ; Mon, 5 Oct 2009 18:27:18 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 36F938FC1D for ; Mon, 5 Oct 2009 18:27:17 +0000 (UTC) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n95IGfX9009391; Mon, 5 Oct 2009 14:16:41 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.2.2 (mail.netplex.net [204.213.176.10]); Mon, 05 Oct 2009 14:16:41 -0400 (EDT) Date: Mon, 5 Oct 2009 14:16:41 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Jilles Tjoelker In-Reply-To: <20091005171729.GA2830@stack.nl> Message-ID: References: <20091005171729.GA2830@stack.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Content-ID: Content-Disposition: inline Cc: freebsd-threads@freebsd.org Subject: Re: review request: making openat(2) a cancellation point X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2009 18:27:18 -0000 On Mon, 5 Oct 2009, Jilles Tjoelker wrote: > While implementing a faster, cleaner and more compliant getcwd(3) using > *at functions, I noticed that openat() was not a cancellation point > (unlike open()). I think that should be fixed first, both for its own > sake and because getcwd() will need to use _openat. POSIX states that openat() is a cancellation point, so it should be changed accordingly. I have not reviewed th patch, but the intent is valid :-) > I created the attached patch. It seems to work, I can still compile and > run non-threaded and threaded programs using openat() and I can cancel a > thread blocked in openat() (such as trying to open a fifo). I can also > use _openat in libc. However, I think some review is appropriate because > it all looks fairly complicated. > > Because libkse and libc_r don't seem to be built, I have not updated > them. > > Note that this will cause threaded 9.x binaries that use openat() to > break on 8.x. This is to be expected. -- DE