home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / linux / 15725 < prev    next >
Encoding:
Internet Message Format  |  1992-11-05  |  2.0 KB

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