explain_fclose_or_die(3)

explain_fclose_or_die3

Close a stream and report errors

Usage

#include <libexplain/fclose.h>
void explain_fclose_or_die(FILE *fp);

Overview

The explain_fclose_or_die function is used to fflush(3) and fclose(3) the given stream. If there is an error, it will be reported using explain_fclose(3), and then terminates by calling exit(EXIT_FAILURE).

explain_fclose_or_die(fp);
fp

The fp, exactly as to be passed to the fclose(3) system call.

Returns:

Only returns on success. Reports error and process exits on failure.

Releases

6 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7
  2. 9–13

Author

Written by Peter Miller <[email protected]>

From libexplain-dev 1.4.D001-16 in Debian 13 (Trixie). Parsed by carta from the page's man source.