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 *templat);
12       int explain_mkstemp_on_error(char *templat);
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       templat The template, exactly as to be passed to the mkstemp(3)  system
26               call.
27

RETURN VALUE

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

EXAMPLE

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

SEE ALSO

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