This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [BUG] Generic syscalls -- chmod vs. fchmodat


On Monday, January 24, 2011 16:05:14 Roland McGrath wrote:
> POSIX says "A null pathname shall not be successfully resolved."  This
> applies to relative pathnames too, and a file name argument to an *at
> function using AT_FDCWD is a relative pathname.  So I think there is no
> situation at all in which the empty string should resolve to anything.
> It's generally in the domain of the kernel to enforce these kinds of rules,
> so I think that having the kernel fail with ENOENT for all empty-string
> cases is the right thing to do.

typically, Linux isnt hard pressed to enforce POSIX semantics.  that barrier 
is the realm of glibc.  the *at functions as implemented by Linux can provide 
neat semantics where you can open a directory, process a bunch of files via 
that fd, and then turn around and operate on the dir itself with NULL or "" 
paths.  plus, once Linux has shipped with a syscall behavior set, Linus really 
doesnt let people change it.  which means it's back on glibc's head to provide 
POSIX semantics to application.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]