Messages in this thread | | | Date | Sat, 9 Jan 1999 09:59:42 GMT | From | "Stephen C. Tweedie" <> | Subject | Re: [PATCH] Re: ext2fs problem with rename() system call |
| |
Hi,
On Sat, 9 Jan 1999 08:07:41 +0000, Jamie Lokier <lkd@tantalophile.demon.co.uk> said:
> On Sat, Jan 09, 1999 at 12:41:41AM +0000, Stephen C. Tweedie wrote: >> > 1. The problem is that if source and destination are the same file, it >> > returns zero ("success") but does not remove the source file. It >> > should remove the source file.
> Not having a POSIX.1 spec, I assumed the more intuitive semantics would > be right... The POSIX-specified behaviour still seems weird to me, but > we must stick to it.
Heh. In cases like these, the "right" behavior is whatever the previous version happened to do in the circumstances. :)
> I don't think you have to update the mtime if the directory doesn't > change (i.e., the (name,inode) list stays the same. But someone had > better check the standards.
...
> ctime is not updated when a file is modified, only when its attributes > change.
I did check. Posix.1:
"Upon successful completion, the rename function shall mark for update the st_ctime and st_mtime fields of the parent directory of each file."
btw, singleunix is online if you want it:
http://www.opengroup.org/onlinepubs/7908799/toc.htm
--Stephen
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |