last_fd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

last_fd(9) πŸŽ€

okay bestie, this is the Kernel API Manual page for last_fd, and it's lowkey a tiny little icon. it does exactly one job and does it slayfully ✨

NAME 🌸

last_fd β€” return last valid index into fd table

SYNOPSIS ✨

unsigned last_fd (struct fdtable *fdt );

ARGUMENTS 🫢

  • fdt β€” File descriptor table.

CONTEXT πŸ’…

Either rcu read lock or files_lock must be held. no cap, that's the vibe check: you gotta have one of those held before you call this 🫢

RETURN πŸŽ€

Last valid index into fdtable.

SEE ALSO πŸ”₯

Kernel file ./fs/file.c __file_ref_put(9), fd_install(9), file_close_fd_locked(9), sys_close_range(9), file_close_fd(9), get_file_rcu(9), get_file_active(9), receive_fd(9).


okay that's the whole thing, bestie πŸ’– this page is from ./fs, dated October 2026, and it's the last_fd(9) manual page. go forth and hold that lock 🫢✨

πŸ“¦ where this page comes from