lkml.org 
[lkml]   [2011]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [BUG] Generic syscalls -- chmod vs. fchmodat
Date
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2011-01-24 22:35    [W:0.078 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site