EXPLAIN_FUTIMESAT_OR_DIE(3)
π explain_futimesat_or_die(3) π
okay bestie, sit down, we're doing a Library Functions Manual moment and honestly? this one is a bop. it's from the libexplain family, she's giving "wrapped syscall but make it chatty", and i'm obsessed. π«Ά
β¨ NAME β¨
explain_futimesat_or_die β change timestamps of a file relative to a directory and report errors
like. the name is the whole personality. it does the thing, and if the thing fails, it tells you why and then dramatically exits. main character energy fr fr. π
πΈ SYNOPSIS πΈ
#include <libexplain/futimesat.h>
void explain_futimesat_or_die(int fildes, const char *pathname, const
struct timeval *data);
int explain_futimesat_on_error(int fildes, const char *pathname, const
struct timeval *data);
two functions, two vibes. one of them is a lil dramatic (dies on failure), one of them is chill (comes back and tells you what happened). pick your fighter. π₯
π¦ DESCRIPTION π¦
so, explain_futimesat_or_die is the function you call when you want to call the futimesat(2) system call. and when it fails? no cap, an explanation gets printed to stderr, and that explanation comes straight from the explain_futimesat(3) function. and then, the process terminates by calling exit(EXIT_FAILURE). she said "we're not doing this today" and left. π
meanwhile, explain_futimesat_on_error is her calmer sibling. same energy, same call to futimesat(2), same explanation printed to stderr (again obtained from the explain_futimesat(3) function) β but instead of exiting, it still returns to the caller. respectful. mature. we love her. π
now, the arguments, because details matter:
fildesβ the fildes, exactly as to be passed to thefutimesat(2)system call. no extra seasoning, no notes, pass it through as-is. β¨pathnameβ the pathname, exactly as to be passed to thefutimesat(2)system call. same deal, you're just the messenger. πdataβ the data, exactly as to be passed to thefutimesat(2)system call. you guessed it, verbatim, character for character. π
π RETURN VALUE π
explain_futimesat_or_dieβ only returns on success, and honestly? checkfutimesat(2)for more info on that. on failure it prints an explanation and exits, it does not return. like, at all. not even a little. πexplain_futimesat_on_errorβ always returns the value returned by the wrappedfutimesat(2)system call. consistent queen. π
π§ EXAMPLE π§
the explain_futimesat_or_die function is intended to be used in a fashion similar to the following example:
explain_futimesat_or_die(fildes, pathname, data);
that's it. that's the whole glow-up. short, sweet, slays. β
π₯ SEE ALSO π₯
futimesat(2)β change timestamps of a file relative to a directoryexplain_futimesat(3)β explainfutimesat(2)errorsexit(2)β terminate the calling process
go read these if you want the full lore, iykyk. π
π COPYRIGHT π
libexplain version 1.4 Copyright (C) 2013 Peter Miller
okay that's the whole page bestie, you ate, go call your syscalls responsibly πΈπ
and remember: libexplain version 1.4, Copyright (C) 2013 Peter Miller, and the page is literally called explain_futimesat_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) 2013 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms