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

NAME

6       explain_fchmod_or_die  -  change permissions of an open file and report
7       errors
8

SYNOPSIS

10       #include <libexplain/fchmod.h>
11       void explain_fchmod_or_die(int fildes, mode_t mode);
12       int explain_fchmod_on_error(int fildes, mode_t mode);
13

DESCRIPTION

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

RETURN VALUE

30       The explain_fchmod_or_die function only returns on  success,  see  fch‐
31       mod(2)  for  more  information.  On  failure, prints an explanation and
32       exits, it does not return.
33
34       The explain_fchmod_on_error function always returns the value return by
35       the wrapped fchmod(2) system call.
36

EXAMPLE

38       The  explain_fchmod_or_die function is intended to be used in a fashion
39       similar to the following example:
40              explain_fchmod_or_die(fildes, mode);
41

SEE ALSO

43       fchmod(2)
44               change permissions of an open file
45
46       explain_fchmod(3)
47               explain fchmod(2) errors
48
49       exit(2) terminate the calling process
50
52       libexplain version 1.4
53       Copyright (C) 2013 Peter Miller
54
55
56
57                                                      explain_fchmod_or_die(3)
Impressum