ACCT_PROCESS(9)

πŸ“¦
version 11.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… ACCT_PROCESS(9) πŸ’…

okay so this is a page from the Kernel Developer's Manual β€” yes, kernel devs have manuals too, and yes, this one is about ✨process accounting✨. stay with me bestie, it's actually cute and short.

🌸 NAME 🌸

acct_process β€” the little function that fills in and writes out the process accounting record πŸŽ€

✨ SYNOPSIS ✨

#include <sys/acct.h>

int
acct_process(struct lwp *l);

πŸ¦‹ DESCRIPTION πŸ¦‹

So acct_process is the function that gets called when a process exits. Like, it's the last thing your process does before it's gone, and it's literally just here to do the receipts πŸ’…

If accounting is turned off, it returns immediately β€” no notes, no drama, it just leaves. byeee πŸ‘‹

But if accounting is turned on (turned on via acct(2), iykyk), then acct_process does two things, in order:

  1. it populates the accounting structure β€” the one described over in acct(5) πŸ“‹
  2. then it writes the accounting record out to the file specified by acct(2) πŸ“

so it's giving "fill out the form, then file the form." main character energy honestly.

🌈 RETURN VALUES 🌈

acct_process returns 0 on success πŸŽ‰ and, on failure, it returns the same error codes as vn_rdwr(9) 😭

ngl if you're getting an error back, go read vn_rdwr(9) β€” that's where the actual error lore lives, this page is not the one spilling it.

πŸ‘‘ SEE ALSO πŸ‘‘


🫢 and that's the whole vibe. this page dropped from Debian on August 5, 2024 β€” screenshot it, cite it, love it. periodt. πŸ’–

πŸ“¦ where this page comes from