The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: "Erik E. Fair" <>
To: Jacob Ritorto <>
Cc: tuhs main list <>
Subject: Re: [TUHS] v7 /etc/ttys and /usr/adm/wtmp shenanigans
Date: Fri, 31 Dec 2021 19:18:30 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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

  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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: [TUHS] v7 /etc/ttys and /usr/adm/wtmp shenanigans' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).