home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!warwick!uknet!mcsun!sun4nl!cwi.nl!sander
- From: sander@cwi.nl (Sander Plomp)
- Newsgroups: comp.os.linux
- Subject: Re: Strange minix fs problem: duplicate core files in directory!
- Message-ID: <7830@charon.cwi.nl>
- Date: 5 Nov 92 10:01:23 GMT
- References: <1992Oct30.050149.28125@cheshire.oxy.edu> <1992Oct30.155235.18870@klaava.Helsinki.FI>
- Sender: news@cwi.nl
- Lines: 30
-
- torvalds@klaava.Helsinki.FI (Linus Torvalds) writes:
-
- >You can create several files with the same name in the same directory
- >just by stressing the system very hard and trying to create files with
- >the same name. It's a harmless way to have some fun on your system: the
- >files are distinct but have the same name so you could possibly confuse
- >some programs with it. You can delete them one-by one, or simply rename
- >them: doing a rename on the name will rename the file that is first in
- >the directory, while the other will still have the old name. It's fun
- >to mess with the minds of innocent programs by doing these kinds of
- >stunts - has anybody tried tarring such a directory?
-
- >Note that it isn't exactly easy to create these kinds of duplicate
- >names: you really have to swap pretty badly. I guess I should document
- >it and add it as a "feature" to linux: it's harmless enough that I
- >probably won't try very hard to get it corrected.
-
- Are you sure it is harmless? I though some programs use "lock files" to
- ensure exclusive access to something. File creation is supposed to be
- atomic, so the idea is that only one process will be able to succesfully
- create the lock file. This is not true of linux I gather, are there other
- unix variants for which it is also not true?
-
- Of course file creation is a very stupid mechanism to implement locking,
- but as far as I know there no other portable mechanism, so it is often used.
-
- I know the chances of things going wrong will be small but I would not
- call it harmless. I suggest "mostly harmless".
- --
- Sander Plomp Internet: Sander.Plomp@cwi.nl
-