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

NAME

6       explain_realpath_or_die - return canonical pathname and report errors
7

SYNOPSIS

9       #include <libexplain/realpath.h>
10       char     *explain_realpath_or_die(const     char     *pathname,    char
11       *resolved_pathname);
12       char    *explain_realpath_on_error(const    char    *pathname,     char
13       *resolved_pathname);
14

DESCRIPTION

16       The  explain_realpath_or_die  function  is used to call the realpath(3)
17       system call. On failure an  explanation  will  be  printed  to  stderr,
18       obtained  from  the  explain_realpath(3) function, and then the process
19       terminates by calling exit(EXIT_FAILURE).
20
21       The explain_realpath_on_error function is used to call the  realpath(3)
22       system  call.  On  failure  an  explanation  will be printed to stderr,
23       obtained from the explain_realpath(3) function, but  still  returns  to
24       the caller.
25
26       pathname
27               The pathname, exactly as to be passed to the realpath(3) system
28               call.
29
30       resolved_pathname
31               The resolved_pathname, exactly as to be  passed  to  the  real‐
32               path(3) system call.
33

RETURN VALUE

35       The explain_realpath_or_die function only returns on success, see real‐
36       path(3) for more information. On failure,  prints  an  explanation  and
37       exits, it does not return.
38
39       The  explain_realpath_on_error function always returns the value return
40       by the wrapped realpath(3) system call.
41

EXAMPLE

43       The explain_realpath_or_die function is intended to be used in a  fash‐
44       ion similar to the following example:
45              char *result = explain_realpath_or_die(pathname, resolved_pathname);
46

SEE ALSO

48       realpath(3)
49               return the canonicalized absolute pathname
50
51       explain_realpath(3)
52               explain realpath(3) errors
53
54       exit(2) terminate the calling process
55
57       libexplain version 1.4
58       Copyright (C) 2011 Peter Miller
59
60
61
62                                                    explain_realpath_or_die(3)
Impressum