This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFE: Implementing posix_spawnattr_setfchdir() in glibc
- From: Rich Felker <dalias at aerifal dot cx>
- To: libc-alpha at sourceware dot org
- Date: Mon, 5 Nov 2012 12:14:59 -0500
- Subject: Re: RFE: Implementing posix_spawnattr_setfchdir() in glibc
- References: <50914F19.9070307@redhat.com><5097D73D.9070602@redhat.com>
On Mon, Nov 05, 2012 at 04:11:57PM +0100, Michal Hlavinka wrote:
> I asked why there is no chdir() version, the rationale is that this
> adds an extra set of failure modes, which can be prevented by forcing
> every one to do a openat(AT_FDCWD, ".", O_SEARCH), in which case it is
> guaranteed that at least the directory exists (Linux will have to use
> O_PATH instead of O_SEARCH).
Incidentally, why is glibc failing to define O_SEARCH and O_EXEC?
Using the value of O_PATH for both seems to give the POSIX semantics.
Rich