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