Re: Equivalent of openat() on osx?
Re: Equivalent of openat() on osx?
- Subject: Re: Equivalent of openat() on osx?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 05 May 2011 10:02:30 +0200
Le 5 mai 2011 à 09:38, Stephen J. Butler a écrit : On Thu, May 5, 2011 at 2:33 AM, Tilghman Lesher < email@hidden> wrote: On Thursday 05 May 2011 00:58:48 Eric Gouriou wrote:
Use a per-thread CWD? Darwin supports them but I can't figure
where/whether it is documented. A previous reference to this
capability, from an apple.com address:
<http://lists.apple.com/archives/unix-porting/2008/Mar/msg00028.html>
The *at functions are generally considered to be the way that a per-thread
working directory is implemented. Perhaps the author misspoke or was
referring to an as-yet unreleased version of OS X (10.7 Lion, maybe?).
I grepped the xnu source for 10.6.7 and there's a pthread_chdir syscall implemented. But it doesn't look like it made it any further than that to userland. I didn't to the work of making sure that open/etc take advantage of the per-thread cwd however.
It is declared in sys/syscall.h, so you can probably invoke it using the syscall() method, but I would probably not do that in a shipping product.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden