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

NAME

6       explain_mkdtemp_or_die - create a unique temporary directory and report
7       errors
8

SYNOPSIS

10       #include <libexplain/mkdtemp.h>
11       char *explain_mkdtemp_or_die(char *pathname);
12       char *explain_mkdtemp_on_error(char *pathname);
13

DESCRIPTION

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

RETURN VALUE

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

EXAMPLE

38       The explain_mkdtemp_or_die function is intended to be used in a fashion
39       similar to the following example:
40              char *result = explain_mkdtemp_or_die(pathname);
41

SEE ALSO

43       mkdtemp(3)
44               create a unique temporary directory
45
46       explain_mkdtemp(3)
47               explain mkdtemp(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_mkdtemp_or_die(3)
Impressum