SAM_W...AL_SET(3)

πŸ’– SAM_WARN_SIGNAL_SET(3) πŸ’–

okay bestie, welcome to the Corosync Cluster Engine Programmer's Manual β€” yes, the whole thing, and yes we're doing this one together 🫢


✨ NAME ✨

sam_warn_signal_set β€” set the warn signal, that's it, that's the vibe πŸ’…


🌸 SYNOPSIS 🌸

#include <corosync/sam.h>

cs_error_t sam_warn_signal_set (int warn_signal);

like. one function. one int. we love a low-maintenance icon πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so sam_warn_signal_set is the lil function you call to configure the warning signal β€” the one that gets sent before your app gets actually, for-real killed for being unresponsive 😭

think of it as the "hey bestie, you good?" text before the block button. iconic behaviour honestly.

the default value is SIGTERM. and plot twist β€” you can pass SIGKILL here to emulate the "not warning signal send" behaviour 🫣 no warning, just straight to the consequences, main character energy fr fr.


πŸ’€ RETURN VALUE πŸ’€

this call returns the CS_OK value if it's successful. otherwise, an error gets returned. no cap, that's the whole deal.


πŸ™ˆ ERRORS πŸ™ˆ

  • CS_ERR_BAD_HANDLE β€” the component was not initialized by calling sam_initialize(3), or it was already finalized. like, girl, you have to actually start things before you can use them πŸ’€

⭐ SEE ALSO ⭐

sam_initialize(3)

also dropping the rest of the error crew here because they live in this section for some reason and I refuse to leave them out πŸŽ€:

  • CS_ERR_TRY_AGAIN β€” resource temporarily unavailable 😀
  • CS_ERR_INVALID_PARAM β€” invalid argument, bestie, check ur inputs πŸ“
  • CS_ERR_ACCESS β€” permission denied, not for you i guess 🚫
  • CS_ERR_LIBRARY β€” the connection failed πŸ’”
  • CS_ERR_INTERRUPT β€” system call interrupted by a signal βœ‹
  • CS_ERR_NOT_SUPPORTED β€” the requested protocol/functionality is not supported πŸ™…
  • CS_ERR_MESSAGE_ERROR β€” incorrect auth message received 🀨
  • CS_ERR_NO_MEMORY β€” not enough memory to complete the requested task, she's full 😭

lowkey reminder: SIGTERM is the default, SIGKILL means the warning never sends. don't be shocked when there's no warning. you asked for that. πŸ’…

corosync Man Page Β· 03/11/2010 Β· SAM_W...AL_SET(3) β€” ok that's the whole page bestie, go forth and set ur signals, ily, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from