file_close_fd(9)
This oneβs from the Kernel API Manual, and itβs giving βtiny function, very specific jobβ energy. No cap. π
β¨ NAME β¨
file_close_fd β return file associated with fd π
π¦ SYNOPSIS π¦
struct file * file_close_fd (unsigned int fd );
πΈ ARGUMENTS πΈ
fdβ file descriptor to retrieve file for. Thatβs the whole vibe: you hand over an fd, and itβs the fd weβre retrieving the file for. π
π DESCRIPTION π
It doesnβt take a separate reference count. Thatβs the note, bestie β short and iconic, no extra lore on this page. π
π RETURN π
You get back the file associated with fd β and yep, itβs NULL if fd is not open. π«Ά
π₯ SEE ALSO π₯
- Kernel file
./fs/file.c __file_ref_put(9)fd_install(9)file_close_fd_locked(9)last_fd(9)sys_close_range(9)get_file_rcu(9)get_file_active(9)receive_fd(9)
Go off, kernel crew. π
This page is file_close_fd(9) from ./fs, dated October 2026 β slay, signed off, periodt. π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms