explain_ac...ext_or_die(3)
π explain_acl_from_text_or_die β Library Functions Manual, section 3 π
okay bestie, sit down, hydrate, because we're about to talk about the absolute icon of the ACL-creation world: explain_acl_from_text_or_die and its chill twin, explain_acl_from_text_on_error. same header file, same vibe, two VERY different attitudes toward failure. iykyk π
β¨ NAME β¨
explain_acl_from_text_or_die β create an ACL from text and report errors π¦
πΈ SYNOPSIS πΈ
#include <libexplain/acl_from_text.h>
acl_t explain_acl_from_text_or_die(const char *text);
acl_t explain_acl_from_text_on_error(const char *text);
π DESCRIPTION π
so. the explain_acl_from_text_or_die function exists to call the acl_from_text(3) system call for you, but with drama. and by drama i mean: if it fails, an explanation gets printed to stderr, obtained from the explain_acl_from_text(3) function, and then the process literally terminates by calling exit(EXIT_FAILURE). no coming back from that. it's giving main character exit. π
the explain_acl_from_text_on_error function also calls the acl_from_text(3) system call. on failure, an explanation will be printed to stderr, obtained from the explain_acl_from_text(3) function β but then it still returns to the caller. it reports the tea and then hands the problem right back to you. so mature of it. π«Ά
the argument π
textβ the text, exactly as to be passed to theacl_from_text(3)system call. exactly, bestie. don't be creative with it.
β RETURN VALUE β
explain_acl_from_text_or_die only returns on success. want more info on that? see acl_from_text(3). on failure it prints an explanation and exits β it does not return. like, at all. not a single return value. it's gone. π
explain_acl_from_text_on_error always returns the value return by the wrapped acl_from_text(3) system call. every single time. no notes.
π EXAMPLE π
the explain_acl_from_text_or_die function is intended to be used in a fashion similar to the following example:
acl_t result = explain_acl_from_text_or_die(text);
literally that simple. iconic. β¨
π SEE ALSO π
acl_from_text(3)β create an ACL from textexplain_acl_from_text(3)β explainacl_from_text(3)errorsexit(2)β terminate the calling process
π COPYRIGHT π
okay that's the whole page, bestie, you ate π
this masterpiece of a manual ships with libexplain version 1.4, and the copyright belongs to Copyright (C) 2013 Peter Miller. so yeah β go make some ACLs, and remember: one of these functions will hold your hand and one will walk out the door. choose wisely π¦β¨
π¦ 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