Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Oct 2009 14:16:41 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: review request: making openat(2) a cancellation point
Message-ID:  <Pine.GSO.4.64.0910051414310.9867@sea.ntplx.net>
In-Reply-To: <20091005171729.GA2830@stack.nl>
References:  <20091005171729.GA2830@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0910051414310.9867>