CMAP_FD_GET(3)
π CMAP_FD_GET π
okay bestie, welcome to the Corosync Cluster Engine Programmer's Manual, section 3, page CMAP_FD_GET. yes it's giving "slightly intimidating C library docs" but honestly? it's a whole vibe once you get it, i promise. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
cmap_fd_get β Dispatches callbacks from the CMAP service
πΈ SYNOPSIS πΈ
#include <corosync/cmap.h>
cs_error_t cmap_fd_get (cmap_handle_t handle, int *fd);
π¦ DESCRIPTION π¦
so like. the cmap_fd_get function is used to retrieve the file descriptor that may be used with the poll system call, so you can figure out when cmap_dispatch(3) won't block. iconic behaviour honestly, it's giving "i just want to know when it's my turn" π
but here's the thing, and this is the part people mess up: the handle argument may not be used directly with poll because it is not the file descriptor. it's an internal identifier used by the CMAP library. so no, you can't just yeet your handle into poll and hope for the best β that's not it, bestie. get the real fd with this function first. no cap. π
β RETURN VALUE β
this call returns the CS_OK value if successful. otherwise, an error is returned. simple as that, periodt. β¨
π SEE ALSO π
and now for the error code lineup, because she contains multitudes:
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
not me listing every single error like a girlboss π but fr fr, know your error codes, future you will thank present you.
okay that's the whole page, you ate it, you understood it, main character energy confirmed ππ
this was brought to you by the corosync Man Page, dated 23/01/2012 β yes, she's vintage, she's a classic, and she still slays. bye bestie, go poll responsibly ππ§
π¦ where this page comes from
- debian bookworm: libcmap-dev 3.1.7-1+deb12u2 Β· BSD-3-Clause
- debian trixie: libcmap-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: libcmap-dev 3.1.6-1ubuntu1 Β· BSD-3-Clause
- ubuntu jammy: libcmap-dev 3.1.6-1ubuntu1.2 Β· BSD-3-Clause
- ubuntu noble: libcmap-dev 3.1.7-1ubuntu3 Β· BSD-3-Clause
- ubuntu noble: libcmap-dev 3.1.7-1ubuntu3.2 Β· BSD-3-Clause
- ubuntu questing: libcmap-dev 3.1.9-2ubuntu1
- ubuntu questing: libcmap-dev 3.1.9-2ubuntu1.1
- ubuntu resolute: libcmap-dev 3.1.9-2ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libcmap-dev 3.1.10-3ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2012 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms