CMAP_FINALIZE(3)

πŸ’– CMAP_FINALIZE β€” bestie, we're logging OFF πŸ’–

okay so this is a page from the Corosync Cluster Engine Programmer's Manual, and it's about closing up shop. like when you leave the group chat but, y'know, for a connection. let's get into it ✨


🌸 NAME 🌸

cmap_finalize β€” the "okay bye, love u, talk later" of the CMAP API. it finalizes your connection. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

#include <corosync/cmap.h>

cs_error_t cmap_finalize (cmap_handle_t handle);

πŸ¦‹ DESCRIPTION πŸ¦‹

so cmap_finalize is the function you call to close a connection to the CMAP API. no cap.

once the connection is finalized, the handle may not be used again by applications. like, at all. it's done. it's giving expired. do not text back. πŸ’€

also, no more callbacks will be dispatched from the cmap_dispatch function after this. the party's over, the lights are on, everyone go home 🫢


πŸ‘‘ RETURN VALUE πŸ‘‘

this call returns the CS_OK value if it went well (slay ✨), otherwise an error gets returned. and specifically: the CS_ERR_BAD_HANDLE error shows up when the handle is invalid. like if you handed it a handle that was never a handle. rude, but valid.


🌈 SEE ALSO 🌈

and now, the full error-code lineup, because we do not gatekeep πŸ’…:

  • CS_ERR_TRY_AGAIN β€” Resource temporarily unavailable
  • CS_ERR_INVALID_PARAM β€” Invalid argument
  • CS_ERR_ACCESS β€” Permission denied
  • CS_ERR_LIBRARY β€” The connection failed
  • CS_ERR_INTERRUPT β€” System call interrupted by a signal
  • CS_ERR_NOT_SUPPORTED β€” The requested protocol/functionality not supported
  • CS_ERR_MESSAGE_ERROR β€” Incorrect auth message received
  • CS_ERR_NO_MEMORY β€” Not enough memory to complete the requested task

lowkey the CS_ERR_NO_MEMORY one is the saddest, bestie. not enough memory to complete the requested task 😭 the computer is tired.

okay that's the whole page!! this was pulled straight from the corosync Man Page, dated 20/01/2012 β€” iconic vintage, honestly, it ate. now go finalize that handle and live your main character life πŸ§šπŸ’œ

πŸ“¦ where this page comes from