home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / question / 15482 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  1.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!phys.ksu.edu!rjq
  2. From: rjq@phys.ksu.edu (Rob Quinn)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: What happens when you remove a file being written in to?
  5. Date: 13 Jan 1993 01:45:09 GMT
  6. Organization: Kansas State University
  7. Lines: 21
  8. Message-ID: <1ivs75INN8u2@moe.ksu.ksu.edu>
  9. References: <1993Jan12.022956.16090@cs.sandia.gov>
  10. NNTP-Posting-Host: bohr.phys.ksu.edu
  11.  
  12. In <1993Jan12.022956.16090@cs.sandia.gov> jhgreen@cs.sandia.gov (Jethro H. Greene) writes:
  13. [removes an open file...]
  14. >What happens?  Is there a threat that I could write over another person's
  15. >file who happens to be "dealt" that particular disk area?
  16.  
  17.  This is from the unlink(2V) man page under SunOS 4.1.2:
  18.  
  19.      unlink() removes the directory entry named by  the  pathname
  20.      pointed to by path and decrements the link count of the file
  21.      referred to by that entry.  If this entry was the last  link
  22.      to  the  file,  and  no  process has the file open, then all
  23.      resources associated with the file are reclaimed.  If,  how-
  24.      ever,  the file was open in any process, the actual resource
  25.      reclamation is delayed until it is closed, even  though  the
  26.      directory entry has disappeared.
  27.  
  28. unlink() is at the center of rm.
  29. --
  30. |                                                                   Rob Quinn |
  31. |                                                            rjq@phys.ksu.edu |
  32. |                                                       QuinnBob@KSUVM.BITNET |
  33.