explain_symlink_or_die(3)
π explain_symlink_or_die(3) π
okay bestie, welcome to the Library Functions Manual corner of the internet, where we're talking about explain_symlink_or_die β literally the moment you make a new name for a file and, if the universe says no, you get a whole explanation before everything shuts down. no cap. π
β¨ NAME β¨
explain_symlink_or_die β make a new name for a file and report errors π¦
β¨ SYNOPSIS β¨
#include <libexplain/symlink.h>
void explain_symlink_or_die(const char *oldpath, const char *newpath);
like, that's the whole vibe. two strings in, chaos out. π
β¨ DESCRIPTION β¨
so the tea is: the explain_symlink_or_die function is used to call the symlink(2) system call. π«Ά
and if it fails? not only does it fail β it prints an explanation to stderr, which it gets from explain_symlink(3), and then the process terminates by calling exit(EXIT_FAILURE). it's giving dramatic exit, and honestly? iconic. πβ¨
this function is intended to be used in a fashion similar to the following example:
explain_symlink_or_die(oldpath, newpath);
oldpathβ the oldpath, exactly as to be passed to thesymlink(2)system call. don't get creative with it, pass it exactly. πnewpathβ the newpath, exactly as to be passed to thesymlink(2)system call. same energy, same rule. π
Returns:
this function only returns on success. on failure, it prints an explanation and exits. so if you see it come back at all, bestie, you ate. π
β¨ SEE ALSO β¨
symlink(2)β make a new name for a file πΈexplain_symlink(3)β explainsymlink(2)errors π₯exit(2)β terminate the calling process π§
β¨ COPYRIGHT β¨
libexplain version 1.4 Copyright (C) 2008 Peter Miller
and that's the whole page, babe β libexplain version 1.4, Copyright (C) 2008 Peter Miller, and this little explain_symlink_or_die(3) moment was brought to you with love. stay slaying, stay linking β¨ππ
π¦ 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