FYI: new openat-like function: mkdirat
Jim Meyering
jim@meyering.net
Thu Dec 1 06:32:00 GMT 2005
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.
More information about the Libc-alpha
mailing list