SAM_STOP(3)

πŸ’– SAM_STOP(3) πŸ’–

okay so bestie, welcome to the Corosync Cluster Engine Programmer's Manual β€” this is sam_stop, a little three-parter from the corosync crew, and honestly? it's giving "short and sweet but you NEED to know it." πŸŽ€


✨ NAME ✨

sam_stop β€” stop health checking. that's it. that's the whole vibe. πŸ›‘


🌸 SYNOPSIS 🌸

#include <corosync/sam.h>

cs_error_t sam_stop (void);

she takes no arguments. zero. nada. a true low-maintenance icon. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so the sam_stop function is what you call to stop health checking of an active process. once you've called it, the application no longer should send helathchecks (yes, that's the spelling in the source, we're keeping it, no cap πŸ’…). and in the case of event driven healthchecking, the healthchecking thread will be stopped. like, actually stopped. gone. thread says bye. πŸ‘‹

the good news tho? a process can always start health checking again by calling the sam_start(3) function. so it's not forever, bestie, it's just a pause. reversible queen behavior. πŸ’–


⭐ RETURN VALUE ⭐

this call returns the CS_OK value if it's successful. otherwise, an error is returned. (yes the manpage says "otherwise and error is returned" β€” we're reporting it, not editing it. 🫢)


πŸ’… ERRORS πŸ’…

  • CS_ERR_BAD_HANDLE β€” health checking was not started by calling the sam_start(3) function. so you're trying to stop something that never started. awkward. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

and here's the full resource-error roundup, straight from the source, no cap:

  • 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 whole page is: stop it, and if you never started it, CS_ERR_BAD_HANDLE will find you. periodt. πŸ’€

okay that's the whole page bestie, go stop some health checks responsibly. this has been the corosync Man Page, dated 12/01/2009, signing off with main character energy πŸŒˆβœ¨πŸ’œ

πŸ“¦ where this page comes from