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

NAME

6       explain_lchownat_or_die - Execute lchownat(2) and report errors
7

SYNOPSIS

9       #include <libexplain/lchownat.h>
10       void explain_lchownat_or_die(int fildes, const char *pathname, int uid,
11       int gid);
12       int explain_lchownat_on_error(int fildes,  const  char  *pathname,  int
13       uid, int gid);
14

DESCRIPTION

16       The  explain_lchownat_or_die  function  is used to call the lchownat(2)
17       system call. On failure an  explanation  will  be  printed  to  stderr,
18       obtained  from  the  explain_lchownat(3) function, and then the process
19       terminates by calling exit(EXIT_FAILURE).
20
21       The explain_lchownat_on_error function is used to call the  lchownat(2)
22       system  call.  On  failure  an  explanation  will be printed to stderr,
23       obtained from the explain_lchownat(3) function, but  still  returns  to
24       the caller.
25
26       fildes  The  fildes,  exactly as to be passed to the lchownat(2) system
27               call.
28
29       pathname
30               The pathname, exactly as to be passed to the lchownat(2) system
31               call.
32
33       uid     The  uid,  exactly  as  to  be passed to the lchownat(2) system
34               call.
35
36       gid     The gid, exactly as to be  passed  to  the  lchownat(2)  system
37               call.
38

RETURN VALUE

40       The  explain_lchownat_or_die  function  only  returns  on  success, see
41       lchownat(2) for more information. On failure, prints an explanation and
42       exits, it does not return.
43
44       The  explain_lchownat_on_error function always returns the value return
45       by the wrapped lchownat(2) system call.
46

EXAMPLE

48       The explain_lchownat_or_die function is intended to be used in a  fash‐
49       ion similar to the following example:
50              explain_lchownat_or_die(fildes, pathname, uid, gid);
51

SEE ALSO

53       lchownat(2)
54               Execute lchownat(2)
55
56       explain_lchownat(3)
57               explain lchownat(2) errors
58
59       exit(2) terminate the calling process
60
62       libexplain version 1.4
63       Copyright (C) 2013 Peter Miller
64
65
66
67                                                    explain_lchownat_or_die(3)
Impressum