Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.unix-wizards Subject: Re: How can unlinking be postponed? Message-ID: <1359@brl-tgr.ARPA> Date: Sun, 8-Sep-85 01:58:24 EDT Article-I.D.: brl-tgr.1359 Posted: Sun Sep 8 01:58:24 1985 Date-Received: Tue, 10-Sep-85 03:04:07 EDT References: <516@riccb.UUCP> Distribution: net Organization: Ballistic Research Lab Lines: 18 > ... Does the directory entry disappear immediately but not > the i-node and its associated disk space? Exactly. > 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? ? Any meaningful system call (e.g., lseek, stat) still works. Only an attempt to locate the unlinked directory entry will fail. There is no reason to put special-case code for this into the kernel. > Is there no way for a file to be removed upon a process' exit? You can use onexit() if your system has it (it probably doesn't). Any file made by tmpfile(3) will vanish upon process termination.