EXPLAIN_ACL_GET_FD_OR_DIE(3)
π explain_acl_get_fd_or_die(3) π
okay bestie, welcome to the Library Functions Manual β¨ this one is explain_acl_get_fd_or_die and she is lowkey a lifesaver, no cap π«Ά
πΈ NAME πΈ
explain_acl_get_fd_or_die β run acl_get_fd(3) and then tell you exactly what went wrong, dramatically π
π¦ SYNOPSIS π¦
#include <libexplain/acl_get_fd.h>
acl_t explain_acl_get_fd_or_die(int fildes);
acl_t explain_acl_get_fd_on_error(int fildes);
β¨ DESCRIPTION β¨
so there's two of them, right, and they're sisters π―
The explain_acl_get_fd_or_die function is here to call the acl_get_fd(3) system call for you. And if it fails? it prints an explanation to stderr β that explanation comes from the explain_acl_get_fd(3) function β and then it ends the whole process by calling exit(EXIT_FAILURE). it does not come back. it's giving "we ride at dawn and if we lose we're done" π
The explain_acl_get_fd_on_error function also calls the acl_get_fd(3) system call. On failure it prints that same explanation to stderr, obtained from the explain_acl_get_fd(3) function, but this one is chill and still returns to the caller π«Ά
fildesβ the fildes, exactly as to be passed to theacl_get_fd(3)system call. like, don't get creative with it, bestie, pass it exactly as-is π
π RETURN VALUE π
The explain_acl_get_fd_or_die function only returns on success β peep acl_get_fd(3) for more info on that. On failure it prints an explanation and exits, so it does not return. at all. periodt π
The explain_acl_get_fd_on_error function always returns the value return by the wrapped acl_get_fd(3) system call. every time, no exceptions, iconic behavior π
π EXAMPLE π
The explain_acl_get_fd_or_die function is intended to be used in a fashion similar to the following example:
explain_acl_get_fd_or_die(fildes);
that's it, that's the whole vibe β¨
π SEE ALSO π
acl_get_fd(3)β Executeacl_get_fd(3)explain_acl_get_fd(3)β explainacl_get_fd(3)errorsexit(2)β terminate the calling process
π COPYRIGHT π
libexplain version 1.4 Copyright (C) 2013 Peter Miller
and that's the tea π this was explain_ac...t_fd_or_die(3) β libexplain version 1.4, Copyright (C) 2013 Peter Miller β mwah, love u, go pass a valid file descriptor ππ§
π¦ where this page comes from
- debian bookworm: libexplain-dev 1.4.D001-12+b1 Β· LGPL-3.0-or-later
- debian trixie: libexplain-dev 1.4.D001-16 Β· LGPL-3.0-or-later
- ubuntu jammy: libexplain-dev 1.4.D001-12 Β· LGPL-3.0-or-later
- ubuntu noble: libexplain-dev 1.4.D001-13 Β· LGPL-3.0-or-later
- ubuntu resolute: libexplain-dev 1.4.D001-16 Β· LGPL-3.0-or-later
- Copyright (C) 2013 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms