AT_QUICK_EXIT(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– AT_QUICK_EXIT(3) πŸ’–

okay so welcome to the at_quick_exit(3) page, bestie β€” this one is from the Library Functions Manual, and it’s literally about registering a cleanup function to run on quick exit. it’s giving β€œlast-minute cleanup before the program dips” energy, and honestly? iconic. πŸ¦‹

🌸 NAME 🌸

at_quick_exit β€” registers a cleanup function to run on quick exit πŸ’…

🧚 LIBRARY 🧚

Standard C Library (libc, -lc) β€” yes bestie, the standard C library, no cap. ✨

✨ SYNOPSIS ✨

#include <stdlib.h>

int
at_quick_exit(void (*func)(void));

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so at_quick_exit() registers a cleanup function to be called when the program exits as a result of calling quick_exit(3). the cleanup functions are called in the reverse order β€” last one registered runs first, stack vibes β€” and they will not be called if the program exits by calling exit(3), _Exit(3), or abort(3). no cap, that distinction is lowkey important. πŸ’€

πŸŽ€ RETURN VALUES πŸŽ€

at_quick_exit() returns the value 0 if successful and a non-zero value on failure. simple, clean, slay. πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

go check them out, iykyk. 🫢

🌈 STANDARDS 🌈

The at_quick_exit() function conforms to ISO/IEC 9899:2011 (β€œISO C11”). periodt. ✨


πŸŽ€ cute sign-off time: source/version is Debian, date is December 7, 2011, and this page is AT_QUICK_EXIT(3). bye bestie, go register those cleanups responsibly! πŸ’–πŸ¦‹
πŸ“¦ where this page comes from