io_uring_unregister_files(3)

✨ io_uring_unregister_files(3) ✨

okay bestie so this is a page from the liburing Manual and it's literally all about telling your ring to forget the file descriptors you already handed it πŸ’…


🌸 NAME 🌸

io_uring_unregister_files β€” unregister file descriptors 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <liburing.h>

int io_uring_unregister_files(struct io_uring *ring);

πŸ’– DESCRIPTION πŸ’–

so the io_uring_unregister_files(3) function does exactly what it says on the tin, no cap: it unregisters the file descriptors that were previously registered to the ring. like, you gave them to the ring earlier, and now you're taking them back. it's giving "we're done here" energy 🧚

no new fds get registered, nothing gets added β€” it's purely the undo button for the registration you already did ✨


πŸ”₯ RETURN VALUE πŸ”₯

on success, io_uring_unregister_files(3) returns 0. slay. πŸŽ‰

on failure it returns -errno β€” so yeah, negative errno, read it and weep (or, like, handle it gracefully, your call) 😭


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie!! this was liburing-2.1, dated November 15, 2021 β€” go unregister some files, you absolute main character πŸ¦‹βœ¨πŸ’œ

πŸ“¦ where this page comes from