explain_ic...ose_or_die(3)
π 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β thecd, exactly as to be passed to theiconv_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 π
iconv_close(3)β deallocate descriptor for character set conversionexplain_iconv_close(3)β explainiconv_close(3)errorsexit(2)β terminate the calling process
π COPYRIGHT π
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
- 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