This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: FYI: new openat-like function: mkdirat
- From: Jim Meyering <jim at meyering dot net>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Thu, 01 Dec 2005 07:32:29 +0100
- Subject: Re: FYI: new openat-like function: mkdirat
- References: <20051130205642.264161809B9@magilla.sf.frob.com> <87wtipn8rf.fsf@rho.meyering.net> <438E620F.6040300@redhat.com>
Ulrich Drepper <drepper@redhat.com> wrote:
>> I've just realized there is some ambiguity in my suggesting `exec*at'.
>
> I haven't read the rest yet but exec*at is completely wrong. This is
> what fexecve is for. This function is implemented for quite some time.
fexecve is part of the solution. What I'd like is a variant of
fexecve that also takes a file descriptor open on the intended working
directory -- the directory that should be used as the cwd for the exec.
Without such a function, any program that works like `find . -execdir'
is forced to perform each pre-exec chdir/fchdir itself, and thus cannot be
thread-safe. But, as I said, I doubt that glibc alone can provide this.