RFE: Implementing posix_spawnattr_setfchdir() in glibc
Michal Hlavinka
mhlavink@redhat.com
Mon Nov 5 15:12:00 GMT 2012
Hi,
I'm forwarding a request I got - if glibc could implement new attribute.
Do you think it'd be possible to add such attribute?
Thanks,
Michal
-------- Original Message --------
Subject: Implementing posix_spawnattr_setfchdir() in Linux glibc
Michal, I need again your help. Apple
OSX and Solaris are going to implement a new attribute for
posix_spawn(), posix_spawnattr_setfchdir() and
posix_spawnattr_getfchdir(), to set and get the new current directory
for the new child process, Default value is AT_FDCWD, which means the
value is inherited from the global cwd.
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).
My question is, can you help me with getting this implemented in
glibc, please? I have attached the Apple OSX header one of the
engineers (Sebastian Feld) send to me, for reference.
Olga
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spawn.h
Type: text/x-chdr
Size: 5073 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20121105/ebe62910/attachment.bin>
More information about the Libc-alpha
mailing list