From: "Erik E. Fair" <fair-tuhs@netbsd.org>
To: Jacob Ritorto <jacob.ritorto@gmail.com>
Cc: tuhs main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] v7 /etc/ttys and /usr/adm/wtmp shenanigans
Date: Fri, 31 Dec 2021 19:18:30 -0800 [thread overview]
Message-ID: <28153.1641007110@cesium.clock.org> (raw)
In-Reply-To: <CAHYQbfAHj8J3Ar44iokPHnmW5h9QA4pGcizL2ouTOAwbDdykfg@mail.gmail.com>
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 prev parent reply other threads:[~2022-01-01 3:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-31 20:36 Will Senn
2022-01-01 2:46 ` Jacob Ritorto
2022-01-01 3:18 ` Erik E. Fair [this message]
2022-01-01 3:36 ` George Michaelson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28153.1641007110@cesium.clock.org \
--to=fair-tuhs@netbsd.org \
--cc=jacob.ritorto@gmail.com \
--cc=tuhs@minnie.tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).