explain_utimes_or_die(3)
π explain_utimes_or_die(3) π
okay bestie, gather round, because this is the libexplain glow-up of utimes(2) and she is serving error messages. This page lives in the Library Functions Manual section, and yes she's a real one. π
β¨ NAME β¨
explain_utimes_or_die β change file access and modify times and report errors
like, she changes your file's access + modify times, and if it goes wrong she tells you, loudly, with receipts. π
πΈ SYNOPSIS πΈ
#include <libexplain/utimes.h>
void explain_utimes_or_die(const char *pathname, const struct timeval *data);
int explain_utimes_on_error(const char *pathname, const struct timeval *data);
π¦ DESCRIPTION π¦
okay so there's two of them and they're sisters, not twins. π―
The explain_utimes_or_die function is used to call the utimes(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_utimes(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
like. she does NOT do second chances. if it fails, the whole process is gone, bestie. main character exit. π
The explain_utimes_on_error function is used to call the utimes(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_utimes(3) function, but still returns to the caller.
she's the chill one. she tells you what happened and then she hands control right back to you like "your problem now, love u π«Ά".
pathnameβ The pathname, exactly as to be passed to theutimes(2)system call. no edits, no vibes-based rewriting, pass it exactly.dataβ The data, exactly as to be passed to theutimes(2)system call. same deal, verbatim, don't touch it.
β RETURN VALUE β
The explain_utimes_or_die function only returns on success, see utimes(2) for more information. On failure, prints an explanation and exits, it does not return.
not me emphasizing this again but fr fr: on failure she exits, she does not come back. there is no return. there is only the void. π
The explain_utimes_on_error function always returns the value return by the wrapped utimes(2) system call.
(yeah she always comes back. she's reliable like that. π)
π EXAMPLE π
The explain_utimes_or_die function is intended to be used in a fashion similar to the following example:
explain_utimes_or_die(pathname, data);
that's it. that's the whole vibe. one line and you're done. iconic. β¨
π SEE ALSO π
utimes(2)β change file last access and modification timesexplain_utimes(3)β explainutimes(2)errorsexit(2)β terminate the calling process
π COPYRIGHT π
libexplain version 1.4
Copyright (C) 2010 Peter Miller
okay that's the whole page bestie, go forth and fix your timestamps. πβ¨
signing off with the source + version + date energy: this is libexplain version 1.4, Copyright (C) 2010 Peter Miller, and the page footer is just the name explain_utimes_or_die(3) doing its little bow at the bottom. π¦πΈπ
explain_utimes_or_die(3) β 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) 2010, 2011 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms