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

NAME

6       explain_setgrent_or_die - rewind group database and report errors
7

SYNOPSIS

9       #include <libexplain/setgrent.h>
10       void explain_setgrent_or_die(void);
11       void explain_setgrent_on_error(void);
12

DESCRIPTION

14       The  explain_setgrent_or_die  function  is used to call the setgrent(3)
15       system call. On failure an  explanation  will  be  printed  to  stderr,
16       obtained  from  the  explain_setgrent(3) function, and then the process
17       terminates by calling exit(EXIT_FAILURE).
18
19       The explain_setgrent_on_error function is used to call the  setgrent(3)
20       system  call.  On  failure  an  explanation  will be printed to stderr,
21       obtained from the explain_setgrent(3) function, but  still  returns  to
22       the caller.
23

RETURN VALUE

25       The  explain_setgrent_or_die function only returns on success, see set‐
26       grent(3) for more information. On failure, prints  an  explanation  and
27       exits, it does not return.
28
29       The  explain_setgrent_on_error function always returns the value return
30       by the wrapped setgrent(3) system call.
31

EXAMPLE

33       The explain_setgrent_or_die function is intended to be used in a  fash‐
34       ion similar to the following example:
35              explain_setgrent_or_die();
36

SEE ALSO

38       setgrent(3)
39               rewind to the start of the group database
40
41       explain_setgrent(3)
42               explain setgrent(3) errors
43
44       exit(2) terminate the calling process
45
47       libexplain version 1.4
48       Copyright (C) 2013 Peter Miller
49
50
51
52                                                    explain_setgrent_or_die(3)
Impressum