1explain_tmpfile_or_die(3)  Library Functions Manual  explain_tmpfile_or_die(3)
2
3
4

NAME

6       explain_tmpfile_or_die - create a temporary file and report errors
7

SYNOPSIS

9       #include <libexplain/tmpfile.h>
10       FILE *explain_tmpfile_or_die(void);
11       FILE *explain_tmpfile_on_error(void);
12

DESCRIPTION

14       The explain_tmpfile_or_die function is used to call the tmpfile(3) sys‐
15       tem call. On failure an explanation will be printed to stderr, obtained
16       from  the  explain_tmpfile(3) function, and then the process terminates
17       by calling exit(EXIT_FAILURE).
18
19       The explain_tmpfile_on_error function is used to  call  the  tmpfile(3)
20       system  call.  On  failure  an  explanation  will be printed to stderr,
21       obtained from the explain_tmpfile(3) function, but still returns to the
22       caller.
23

RETURN VALUE

25       The  explain_tmpfile_or_die  function only returns on success, see tmp‐
26       file(3) for more information. On failure,  prints  an  explanation  and
27       exits, it does not return.
28
29       The  explain_tmpfile_on_error  function always returns the value return
30       by the wrapped tmpfile(3) system call.
31

EXAMPLE

33       The explain_tmpfile_or_die function is intended to be used in a fashion
34       similar to the following example:
35              FILE *result = explain_tmpfile_or_die();
36

SEE ALSO

38       tmpfile(3)
39               create a temporary file
40
41       explain_tmpfile(3)
42               explain tmpfile(3) errors
43
44       exit(2) terminate the calling process
45
47       libexplain version 1.4
48       Copyright (C) 2009 Peter Miller
49
50
51
52                                                     explain_tmpfile_or_die(3)
Impressum