Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site riccb.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!riccb!rjnoe From: rjnoe@riccb.UUCP (Roger J. Noe) Newsgroups: net.unix-wizards Subject: How can unlinking be postponed? Message-ID: <516@riccb.UUCP> Date: Fri, 6-Sep-85 15:51:23 EDT Article-I.D.: riccb.516 Posted: Fri Sep 6 15:51:23 1985 Date-Received: Sat, 7-Sep-85 13:37:37 EDT Distribution: net Organization: Rockwell International - Downers Grove, IL Lines: 17 Perhaps I am misreading the manual, but I am under the impression that if a process unlinks a file while any process has the same file open and that is the last link to the file, then the actual removal of the file is post- poned until the last process with the file open closes the file, either explicitly or by exit or exec. Yet when I try experiments with one or more background processes and then do ls's in the foreground, I find the file disappears immediately after one process does its unlink()! What's going on here? Does the directory entry disappear immediately but not the i-node and its associated disk space? If that's so, shouldn't any syscall except read return an error value since the process making that call is under the reasonable impression that the file's still there when it isn't? Is there no way for a file to be removed upon a process' exit? -- "It's only by NOT taking the UNIX system seriously that I retain what fragments of my once considerable mental powers I still possess!" (apologies to Arthur Clarke) Roger Noe ihnp4!riccb!rjnoe