[TUHS] v7 /etc/ttys and /usr/adm/wtmp shenanigans

George Michaelson ggm at algebras.org
Sat Jan 1 13:36:52 AEST 2022


It was bad luck if the process holding your file open was an unkillable
zombie. Reboot and clri fixes all things. Okay maybe "fix" isn't the word I
want...

On Sat, 1 Jan 2022, 1:27 pm Erik E. Fair, <fair-tuhs at netbsd.org> wrote:

> Classically, files don't get de-allocated (their blocks re-added to the
> filesystem free list) until the last open reference to their inode is
> removed, even if the file name is removed from all directories.
>
> This behavior is commonly used for temporary files: open(2) with O_CREAT
> and unlink(2), and file disappears when the file descriptor is finally
> closed or the process exits without explicitly closing the descriptor (the
> kernel will close all descriptors associated with an exiting process).
>
> Where process accounting is concerned, the kernel itself holds the inode
> reference until it is explictly told to turn off process accounting. See
> acct(2).
>
>         Erik Fair
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20220101/1f0e0f89/attachment.htm>


More information about the TUHS mailing list