CPG_LEAVE(3)
π CPG_LEAVE(3) π
okay bestie, welcome to the Corosync Cluster Engine Programmer's Manual β¨ this one's a lil three-parter from the CPG library and it's literally the "goodbye, i'm out" button πͺπ¨
πΈ NAME πΈ
cpg_leave β Leave a group in the CPG library π«Ά
β¨ SYNOPSIS β¨
#include <corosync/cpg.h>
int cpg_leave(cpg_handle_t handle, struct cpg_name *group);
π¦ DESCRIPTION π¦
so, the cpg_leave function is what you call when you wanna leave a group. that's the whole vibe. once a group has been left, the process will no longer receive messages or notifications about events in that group. bye bye group chat π«‘
β οΈ but hold on β pay attention bestie, this is the part that gets people. a process is only deemed to have left the group once it has been notified (by its confchg callback) that it has left. so expect to receive at least one confchg callback after calling this function. that's not a bug, that's just the handshake π don't be out here thinking you're gone before the callback says you're gone.
the argument group is what you use to specify the group to leave. it is currently ignored though, because only one group can be joined per handle. it's literally just sitting there in the signature to allow for future development π (iconic of them, honestly)
π RETURN VALUE π
this call returns the CS_OK value if it worked, otherwise an error gets returned. no in-between, no grey area π
π ERRORS π
ngl bestie... the errors are undocumented π that's it, that's the section.
π SEE ALSO π
cpg_overview(3),cpg_initialize(3),cpg_finalize(3),cpg_fd_get(3)cpg_dispatch(3),cpg_join(3),cpg_leave(3),cpg_mcast_joined(3)cpg_membership_get(3)cpg_zcb_alloc(3)cpg_zcb_free(3)cpg_zcb_mcast_joined(3)cpg_context_get(3)cpg_context_set(3)cpg_local_get(3)
and the error codes, gathered here like a lil friend group β¨
CS_ERR_TRY_AGAINβ Resource temporarily unavailableCS_ERR_INVALID_PARAMβ Invalid argumentCS_ERR_ACCESSβ Permission deniedCS_ERR_LIBRARYβ The connection failedCS_ERR_INTERRUPTβ System call interrupted by a signalCS_ERR_NOT_SUPPORTEDβ The requested protocol/functionality not supportedCS_ERR_MESSAGE_ERRORβ Incorrect auth message receivedCS_ERR_NO_MEMORYβ Not enough memory to complete the requested task
okay that's the whole page bestie, go forth and leave your groups responsibly π β¨
mwah π this was the corosync Man Page, dated 2004-08-31, and you've been reading CPG_LEAVE(3) β periodt. ππΈ
π¦ where this page comes from
- debian bookworm: libcpg-dev 3.1.7-1+deb12u2 Β· BSD-3-Clause
- debian trixie: libcpg-dev 3.1.9-2+deb13u1 Β· BSD-3-Clause
- epel 9: corosynclib-devel 3.1.10-0.2.el9.1 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- nixos 26.05: corosync 3.1.9
- nixpkgs unstable: corosync 3.1.9
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- ubuntu jammy: libcpg-dev 3.1.6-1ubuntu1 Β· BSD-3-Clause
- ubuntu jammy: libcpg-dev 3.1.6-1ubuntu1.2 Β· BSD-3-Clause
- ubuntu noble: libcpg-dev 3.1.7-1ubuntu3 Β· BSD-3-Clause
- ubuntu noble: libcpg-dev 3.1.7-1ubuntu3.2 Β· BSD-3-Clause
- ubuntu questing: libcpg-dev 3.1.9-2ubuntu1
- ubuntu questing: libcpg-dev 3.1.9-2ubuntu1.1
- ubuntu resolute: libcpg-dev 3.1.9-2ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libcpg-dev 3.1.10-3ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2006 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms