review request: making openat(2) a cancellation point
Daniel Eischen
deischen at freebsd.org
Mon Oct 5 18:27:18 UTC 2009
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
More information about the freebsd-threads
mailing list