explain_link_or_die(3)
π explain_link_or_die(3) π
okay bestie, welcome to the Library Functions Manual β this one's short, sweet, and honestly kind of iconic β¨
πΈ NAME πΈ
explain_link_or_die β make a new name for a file and report errors π«Ά
β¨ SYNOPSIS β¨
#include <libexplain/link.h>
void explain_link_or_die(const char *oldpath, const char *newpath);
π DESCRIPTION π
so like. the explain_link_or_die function is the girl who calls the link(2) system call for you. and if things go β¨wrongβ¨? she prints an explanation straight to stderr β that explanation comes from explain_link(3) β and then she ends the whole process by calling exit(EXIT_FAILURE). no cap, that's the whole vibe. π
this function is meant to be used in a fashion similar to the following example:
explain_link_or_die(oldpath, newpath);
oldpathβ the oldpath, exactly as to be passed to thelink(2)system call. like, don't get creative with it, hand it over as-is πΈnewpathβ the newpath, exactly as to be passed to thelink(2)system call. same energy, exactly as-is π
Returns:
this function only returns on success. on failure, she prints an explanation and exits. periodt. π
ngl bestie, "only returns on success" is doing a LOT of heavy lifting in that sentence β if it fails, you literally do not come back. plan accordingly π
π¦ SEE ALSO π¦
link(2)β make a new name for a fileexplain_link(3)β explainlink(2)errorsexit(2)β terminate the calling process
π COPYRIGHT π
libexplainversion1.4β- Copyright (C) 2008 Peter Miller π
okay that's the whole page, you ate that π and for the cute sign-off: this lil masterpiece lives under the header explain_link_or_die(3), comes to you courtesy of libexplain version 1.4, and it's copyright 2008 Peter Miller β mwah, go link some files bestie πβ¨π¦
π¦ 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) 2008, 2009, 2011 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms