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

NAME

6       explain_mkstemp_or_die  -  create  a  unique  temporary file and report
7       errors
8

SYNOPSIS

10       #include <libexplain/mkstemp.h>
11       int explain_mkstemp_or_die(char *template);
12       int explain_mkstemp_on_error(char *template);
13

DESCRIPTION

15       The explain_mkstemp_or_die function is used to call the mkstemp(3) sys‐
16       tem call. On failure an explanation will be printed to stderr, obtained
17       from the explain_mkstemp(3) function, and then the  process  terminates
18       by calling exit(EXIT_FAILURE).
19
20       The  explain_mkstemp_on_error  function  is used to call the mkstemp(3)
21       system call. On failure an  explanation  will  be  printed  to  stderr,
22       obtained from the explain_mkstemp(3) function, but still returns to the
23       caller.
24
25       template
26               The template, exactly as to be passed to the mkstemp(3)  system
27               call.
28

RETURN VALUE

30       The  explain_mkstemp_or_die  function  only  returns  on  success,  see
31       mkstemp(3) for more information. On failure, prints an explanation  and
32       exits, it does not return.
33
34       The  explain_mkstemp_on_error  function always returns the value return
35       by the wrapped mkstemp(3) system call.
36

EXAMPLE

38       The explain_mkstemp_or_die function is intended to be used in a fashion
39       similar to the following example:
40              int result = explain_mkstemp_or_die(template);
41

SEE ALSO

43       mkstemp(3)
44               create a unique temporary file
45
46       explain_mkstemp(3)
47               explain mkstemp(3) errors
48
49       exit(2) terminate the calling process
50
52       libexplain version 0.40
53       Copyright (C) 2009 Peter Miller
54
55
56
57                                                     explain_mkstemp_or_die(3)
Impressum