UPSCLI_DISCONNECT(3)
β¨ UPSCLI_DISCONNECT(3) β¨
okay bestie, welcome to the NUT Manual page for upscli_disconnect β yes that's the manual name, it's giving very "libupsclient core library" and we're obsessed π
πΈ NAME πΈ
upscli_disconnect β say bye-bye to your UPS server connection ππ¦
π SYNOPSIS π
#include <upsclient.h>
int upscli_disconnect(UPSCONN_t *ups);
π DESCRIPTION π
so like. upscli_disconnect() takes that pointer ups you've been holding onto β the one pointing at a UPSCONN_t state structure β and it shuts the whole connection to the server DOWN, then frees all the dynamic memory that state structure was hogging. clean girl behaviour, honestly π§Ήβ¨
β οΈ heads up bestie: after you call this, the UPSCONN_t structure is no longer valid. like, do not touch it. it's gone. she's retired. periodt π
and fr fr β this function must be called, or your program is gonna leak memory and file descriptors. not a vibe. not the main character energy we're going for π
π₯ RETURN VALUE π₯
upscli_disconnect() returns 0 on success, or -1 if an error occurs. that's it, that's the tea ββ¨
π SEE ALSO π
and that's the whole page, bestie β this icon was brought to you by Network UPS Tools 2.8.5, dated 10/07/2026 π«Ά go free your file descriptors, you deserve it ππ
π¦ where this page comes from
- fedora 43: nut-devel 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 43: nut-devel 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut-devel 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut-devel 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms