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

NAME

6       explain_chown_or_die - change ownership of a file and report errors
7

SYNOPSIS

9       #include <libexplain/chown.h>
10       void explain_chown_or_die(const char *pathname, int owner, int group);
11

DESCRIPTION

13       The  explain_chown_or_die  function is used to call the chown(2) system
14       call.  On failure an explanation will be printed  to  stderr,  obtained
15       from  explain_chown(3),  and  then  the  process  terminates by calling
16       exit(EXIT_FAILURE).
17
18       This function is intended to be used in a fashion similar to  the  fol‐
19       lowing example:
20              explain_chown_or_die(pathname, owner, group);
21
22       pathname
23               The  pathname,  exactly  as to be passed to the chown(2) system
24               call.
25
26       owner   The owner, exactly as to be passed to the chown(2) system call.
27
28       group   The group, exactly as to be passed to the chown(2) system call.
29
30       Returns:
31               This function only returns on success.  On failure,  prints  an
32               explanation and exits.
33

SEE ALSO

35       chown(2)
36               change ownership of a file
37
38       explain_chown(3)
39               explain chown(2) errors
40
41       exit(2) terminate the calling process
42
44       libexplain version 1.4
45       Copyright (C) 2008 Peter Miller
46
47
48
49                                                       explain_chown_or_die(3)
Impressum