From: Spencer Shepler (shepler@eng.sun.com)
Date: 05/23/01-07:25:41 PM Z
Date: Wed, 23 May 2001 19:25:41 -0500 From: Spencer Shepler <shepler@eng.sun.com> Subject: Re: todo list for RFC3010 Message-ID: <20010523192541.M100350@dhcp-aus08-229.central.sun.com> On Wed, Matthew J. Zito wrote: > [root@wwwb db]# strace touch testfile > <snip all kinds of irrelevant system calls> > open("/usr/share/locale/en_US/LC_CTYPE", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=10428, ...}) = 0 > mmap(0, 10428, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40112000 > close(3) = 0 > stat("testfile", 0xbffffc20) = -1 ENOENT (No such file or directory) > open("testfile", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 > EACCES (Permission denied) > > Is there something else that is making this happen? I verified that > the linux box is under the impression its mounted read-write. Well, in this particular instance, the file doesn't exist and the open() is attempting to create it. This is failing with EACCES as expected. > But. even if there are implementations that fail on write() (or > there's something bizarre going on here), failing on open() is (to my > mind) more correct than failing on a write - you're opening with the > intention to write, so if you're not allowed to write, it should > notify you then, not at the first write attempt. We have two votes for fail on open() of a read-only filesystem and I agree that it should fail on open(). The item was in the issues list to ensure the rfc was clear about what was expected. -- - Spencer -
This archive was generated by hypermail 2.1.2 : 03/04/05-01:48:47 AM Z CST