xcb_shm_detach(3)

πŸ“¦
version 1.17.0 Β· 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– xcb_shm_detach β€” the "okay bye bestie" of shared memory πŸ’–

okay so this is a page from the XCB Requests manual (that's the libxcb crew, X Version 11 girlies), and it's about xcb_shm_detach β€” the function that says bye-bye to a shared memory segment. it's giving ✨closure✨.


🌸 NAME 🌸

xcb_shm_detach β€” destroys the specified shared memory segment. that's it. that's the whole job. no cap. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

first things first, you gotta bring in the header:

#include <xcb/shm.h>

✨ Request function ✨

xcb_void_cookie_t xcb_shm_detach(xcb_connection_t *conn,
       xcb_shm_seg_t shmseg);

πŸ¦‹ REQUEST ARGUMENTS πŸ¦‹

  • conn β€” the XCB connection to X11. your lil hotline to the X server, basically. πŸ“ž
  • shmseg β€” the segment to be destroyed. yes, that segment. it's over for her. πŸ’€

🌈 DESCRIPTION 🌈

so what does it actually do? it destroys the specified shared memory segment. periodt. 🫢

and here's the tea: this will never fail unless the segment number is incorrect. like, that's the only way to fumble this. the segment number is either right and it slays, or it's wrong and it doesn't. main character energy either way. πŸ‘‘


⭐ RETURN VALUE ⭐

it hands you back an xcb_void_cookie_t. cute, right? but listen β€” errors (if any) have to be handled in the event loop. you don't get them handed to you on a platter, bestie. πŸ™ˆ

now, if you'd rather handle errors directly with xcb_request_check instead, then you want xcb_shm_detach_checked. that's your girl for that. head to xcb-requests(3) for the full details, iykyk. πŸ’œ


πŸ’€ ERRORS πŸ’€

this request does never generate any errors.

literally iconique behaviour. zero drama. not a single error to be found. 🌸✨


🧚 SEE ALSO 🧚


πŸ‘‘ AUTHOR πŸ‘‘

generated from shm.xml. contact xcb@lists.freedesktop.org for corrections and improvements β€” they're literally taking feedback, besties, go be helpful. πŸ’Œ


and that's the vibe check, done and dusted πŸ’– this whole thing comes to you from X Version 11, libxcb 1.17.0, and yeah β€” xcb_shm_detach(3), that's her. bye bestie, go detach something responsibly βœ¨πŸŽ€πŸ¦‹