EXPLAIN_ACL_SET_FILE_OR_DIE(3)
π explain_acl_set_file_or_die π
okay bestie, welcome to the manual page for explain_acl_set_file_or_die(3) β yes that's the real name, it's a whole mouthful, and it lives in the Library Functions Manual section of your man pages. it's giving "long function name, tiny job," and honestly? we love that for it. π
β¨ NAME β¨
explain_acl_set_file_or_die β set an ACL by filename and report errors
π¦ SYNOPSIS π¦
#include <libexplain/acl_set_file.h>
void explain_acl_set_file_or_die(const char *pathname, acl_type_t type,
acl_t acl);
int explain_acl_set_file_on_error(const char *pathname, acl_type_t type,
acl_t acl);
πΈ DESCRIPTION πΈ
so here's the tea, bestie. π
The explain_acl_set_file_or_die function is used to call the acl_set_file(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_acl_set_file(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
π read that again: on failure it does NOT come back. it prints the explanation and then straight-up exit(EXIT_FAILURE)s your whole program. main character energy, but make it fatal.
The explain_acl_set_file_on_error function is used to call the acl_set_file(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_acl_set_file(3) function, but still returns to the caller.
π«Ά this one is the chill sibling β it still tells you what went wrong, but it lets you keep living your life.
the arguments (they're literally just passed straight through, no cap)
pathnameβ The pathname, exactly as to be passed to theacl_set_file(3)system call.typeβ The type, exactly as to be passed to theacl_set_file(3)system call.aclβ The acl, exactly as to be passed to theacl_set_file(3)system call.
π RETURN VALUE π
The explain_acl_set_file_or_die function only returns on success, see acl_set_file(3) for more information. On failure, prints an explanation and exits, it does not return.
π "does not return" is not a vibe, it's a fact. don't write code after it expecting to wake up there.
The explain_acl_set_file_on_error function always returns the value return by the wrapped acl_set_file(3) system call.
π EXAMPLE π
The explain_acl_set_file_or_die function is intended to be used in a fashion similar to the following example:
explain_acl_set_file_or_die(pathname, type, acl);
that's it. that's the whole example. iconic, honestly. β¨
π SEE ALSO π
acl_set_file(3)β set an ACL by filenameexplain_acl_set_file(3)β explainacl_set_file(3)errorsexit(2)β terminate the calling process
π COPYRIGHT π
libexplain version 1.4 Copyright (C) 2013 Peter Miller
and that's the page, bestie!! π§ you made it to the end, so here's your cute lil sign-off: this was explain_ac...file_or_die(3), brought to you by libexplain version 1.4, with copyright vibes from 2013 Peter Miller. now go set those ACLs responsibly, or at least with a really good error message. periodt. π
β¨
π¦ 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