explain_ic...ose_or_die(3)

πŸ“¦
version 1.4.D001 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute

πŸ’– NAME πŸ’–

bestie, this is explain_iconv_close_or_die β€” it deallocates a conversion descriptor, and if that goes sideways it tells you and then, uh, ends the whole program. no cap.


✨ SYNOPSIS ✨

#include <libexplain/iconv_close.h>
void explain_iconv_close_or_die(iconv_t cd);
int explain_iconv_close_on_error(iconv_t cd);

🌸 DESCRIPTION 🌸

okay so there are two of them and they're siblings, not twins, and the difference matters, so listen up 🫢

The explain_iconv_close_or_die function is the one that calls the iconv_close(3) system call for you. If it fails, an explanation gets printed to stderr β€” and that explanation comes straight from the explain_iconv_close(3) function β€” and then the process terminates by calling exit(EXIT_FAILURE). yeah. it's giving "we die on this hill". πŸ’€

The explain_iconv_close_on_error function also calls the iconv_close(3) system call, and on failure it also prints an explanation to stderr, also obtained from the explain_iconv_close(3) function β€” but then it still returns to the caller. no dramatic exit, she simply comes back. πŸ’…

  • cd β€” the cd, exactly as to be passed to the iconv_close(3) system call.

⭐ RETURN VALUE ⭐

The explain_iconv_close_or_die function only returns on success β€” see iconv_close(3) for more information. On failure, it prints an explanation and exits, it does not return. like, at all. gone. πŸ¦‹

The explain_iconv_close_on_error function always returns the value return by the wrapped iconv_close(3) system call.


πŸŽ€ EXAMPLE πŸŽ€

The explain_iconv_close_or_die function is intended to be used in a fashion similar to the following example:

explain_iconv_close_or_die(cd);

🌈 SEE ALSO 🌈


libexplain version 1.4

Copyright (C) 2013 Peter Miller


okay bestie that's the whole page, you ate it, go close some descriptors responsibly πŸ’œβœ¨ and just so we're official: this was explain_ic...ose_or_die(3), from the Library Functions Manual, libexplain version 1.4, Copyright (C) 2013 Peter Miller. periodt. πŸŽ€πŸ”₯

πŸ“¦ where this page comes from