Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.wizards Subject: Re: unlink safe before close? Message-ID: <8412@chinet.chi.il.us> Date: 9 May 89 04:10:07 GMT References: <755@unify.UUCP> <8201@phoenix.Princeton.EDU> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Distribution: usa Organization: Chinet - Public Access Unix Lines: 15 In article <8201@phoenix.Princeton.EDU> bernsten@phoenix.Princeton.EDU (Dan Bernstein) writes: > [is it nonportable to unlink an fd and still use it?] >According to various UNIX standards and according to the internal >workings of the ``standard'' kernel routines (see, e.g., Bach), >it is perfectly safe. A file is removed when it is fully unlink()ed >*and* fully close()d; link() and unlink() do not affect file behavior >after an open(). Note that this does not apply to NFS file systems. The "stateless" nature of the protocol precludes the server from knowing that a client thinks it still has the file open. Les Mikesell