explain_raise_or_die(3)
π explain_raise_or_die(3) π
okay bestie, welcome to the Library Functions Manual entry for explain_raise_or_die β she's from libexplain and she's here to help you yeet a signal at yourself and tell you exactly why it went wrong. π«Ά
β¨ NAME β¨
explain_raise_or_die β send a signal to the caller and report errors
πΈ SYNOPSIS πΈ
#include <libexplain/raise.h>
void explain_raise_or_die(int sig);
int explain_raise_on_error(int sig);
π¦ DESCRIPTION π¦
So, the explain_raise_or_die function is used to call the raise(3) system call. And likeβ¦ if it fails? An explanation gets printed to stderr, obtained from the explain_raise(3) function, and then the process terminates by calling exit(EXIT_FAILURE). It's giving "we're done here, no notes, no survivors." π
The explain_raise_on_error function is also used to call the raise(3) system call. If it fails, an explanation will be printed to stderr, obtained from the explain_raise(3) function β but this one still returns to the caller. She's the chill sister. She tells you what happened and then lets you keep living your life. π
sigβ thesig, exactly as to be passed to theraise(3)system call. no remixing, no editing, just pass it through fr fr.
π RETURN VALUE π
The explain_raise_or_die function only returns on success β see raise(3) for more information. On failure, it prints an explanation and exits, it does not return. like, at all. ever. gone. π
The explain_raise_on_error function always returns the value return by the wrapped raise(3) system call. (yes, the original says "return" and honestly? we respect it. periodt.)
π EXAMPLE π
The explain_raise_or_die function is intended to be used in a fashion similar to the following example:
explain_raise_or_die(sig);
iconic. flawless. ten out of ten, no notes. β
π₯ SEE ALSO π₯
raise(3)β send a signal to the callerexplain_raise(3)β explainraise(3)errorsexit(2)β terminate the calling process
π COPYRIGHT π
libexplain version 1.4 Copyright (C) 2009 Peter Miller
and that's the whole page bestie!! π§ this was explain_raise_or_die(3) from libexplain version 1.4, copyright Β© 2009 Peter Miller β go forth, raise your signals, and let libexplain hold your hand when it all goes sideways. mwah πβ¨π
π¦ 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) 2009, 2011 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms