Why does touch try to set the time when fd_open already failed
with with EACCESS?

Run as a normal user:

strace touch /x
...
open("/x", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = -1 EACCES (Permission 
denied)
utimensat(AT_FDCWD, "/x", NULL, 0)      = -1 ENOENT (No such file or directory)

Is there a chance on any system that setting the time succeeds
after the EACCESS? Or is this just to keep the function flow
simpler by having the diagnostic centrally afterwards?

Thank you & have a nice day,
Berny


Reply via email to