Subject: Re: funlink() for fun!
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Matthias Buelow <>
List: tech-kern
Date: 07/12/2003 03:53:44
I wrote:

>I think it's not proper to regard [f]unlink() as operating on a file.

I addition, the only proper semantics for an funlink() system call I
could see would be to set the reference counter in the inode to zero,
close/invalidate the file and all descriptors to it and have the
kernel, some external process or fsck at reboot remove all references
from directories.  It might be surprising for users who are accustomed
to what unlink() does but it would be consistent with the
file/dir-entry schism.  It would indeed delete the file, not a
directory entry, which is literally what the caller requested.

  Matthias Buelow;  mkb@{,}