gensio_acc_shutdown(3)
β¨ NAME β¨
gensio_acc_shutdown, gensio_acc_shutdown_s, gensio_acc_disable, gensio_acc_free β bestie, this is how you stop and free a gensio accepter that's already started up π
From the Library Functions Manual, no less. Very official. Very demure. π
πΈ SYNOPSIS πΈ
#include <gensio/gensio.h>
typedef void (*gensio_acc_done)(struct gensio_accepter *acc,
void *cb_data);
int gensio_acc_shutdown(struct gensio_accepter *accepter,
gensio_acc_done shutdown_done,
void *shutdown_data);
int gensio_acc_shutdown_s(struct gensio_accepter *accepter);
void gensio_acc_disable(struct gensio_accepter *accepter);
void gensio_acc_free(struct gensio_accepter *accepter);
okay so that's the whole cast of characters right there π four functions, one callback type, and they all live in <gensio/gensio.h>.
π DESCRIPTION π
So you've got an accepter, it's out there doing its thing, and now you need it to stop. That's literally what this page is about. Let's go one by one, bestie π¦
gensio_acc_shutdown π
This one closes all sockets and disables everything in the gensio accepter. All of it. Gone. Closed for business, doors locked, lights off β¨
If it succeeds, shutdown_done() gets called after the shutdown is complete β but only if shutdown_done is not NULL. So if you pass a null callback, no callback happens, obviously, and that's on you π«Ά
Returns GE_INUSE if the accepter is already shut down. Returns zero otherwise.
bestie theGE_INUSEthing is important β if you try to shut down something that's already shut down, you getGE_INUSE, not a happy zero. know the difference π
gensio_acc_shutdown_s β
This is the synchronous one. It shuts down the gensio and waits for the shutdown to finish. Very "I will stand here until this is done" energy π
β οΈ but like, seriously β see the notes in gensio_close_s(3) for the warning on using this. There are warnings. Go read them. Don't just vibe your way into a blocking call, bestie π
gensio_acc_disable π§
It's like gensio_disable(3), but for accepters. That's it. That's the whole description. Go read gensio_disable(3) for the details, because the details live over there π
gensio_acc_free π
This frees the network accepter. Periodt. ποΈ
But listen β if the network accepter is started up, this shuts it down first, and shutdown_done() is NOT called. Not called. Not even a little. So don't be sitting around waiting for that callback, because it is not coming π
π₯ RETURN VALUES π₯
- Zero β success, slay, we love to see it π
- A gensio error β failure, and it's giving "something went wrong" π
That's it. That's the whole return contract. Note that this applies to the functions that return int β gensio_acc_disable and gensio_acc_free return void, so there's nothing to check there, they just do the thing π
π SEE ALSO π
go read those too, they're the supporting cast and they matter π
okay bestie that's the whole page!! gensio_acc_shutdown(3), from the Library Functions Manual, dated 27 Feb 2019 β that's the source and version and date, and that's your cute little sign-off, mwah ππ¦β¨
π¦ where this page comes from
- alpine 3.22: gensio-doc 2.8.14-r0 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- alpine 3.23: gensio-doc 2.8.14-r0 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- alpine 3.24: gensio-doc 2.8.14-r0 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- arch rolling: gensio 3.0.4-1 Β· GPL
- debian bookworm: libgensio-dev 2.6.2-4 Β· GPL-2.0-only
- debian trixie: libgensio-dev 2.8.13-7 Β· GPL-2.0-only
- epel 9: libgensio-devel 2.8.15-1.el9 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 2.8.15-5.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 2.8.15-5.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 3.0.4-1.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 3.0.4-1.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: libgensio-devel 3.0.2-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: libgensio-devel 3.0.2-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: libgensio-devel 3.0.4-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: libgensio-devel 3.0.4-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- nixos 26.05: gensio 3.0.2
- nixpkgs unstable: gensio 3.0.2
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- ubuntu jammy: libgensio-dev 2.3.5-1build2 Β· GPL-2.0-only
- ubuntu noble: libgensio-dev 2.8.2-6.1build1 Β· GPL-2.0-only
- ubuntu questing: libgensio-dev 2.8.13-7
- ubuntu resolute: libgensio-dev 3.0.0-1build1 Β· GPL-2.0-only
- ubuntu stonking: libgensio-dev 3.0.0-1ubuntu1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms