1explain_getresgid_or_die(3)Library Functions Manualexplain_getresgid_or_die(3)
2
3
4

NAME

6       explain_getresgid_or_die - get r/e/s group IDs and report errors
7

SYNOPSIS

9       #include <libexplain/getresgid.h>
10       void explain_getresgid_or_die(gid_t *rgid, gid_t *egid, gid_t *sgid);
11       int explain_getresgid_on_error(gid_t *rgid, gid_t *egid, gid_t *sgid);
12

DESCRIPTION

14       The  explain_getresgid_or_die function is used to call the getresgid(2)
15       system call. On failure an  explanation  will  be  printed  to  stderr,
16       obtained  from  the explain_getresgid(3) function, and then the process
17       terminates by calling exit(EXIT_FAILURE).
18
19       The explain_getresgid_on_error function is used  to  call  the  getres‐
20       gid(2)  system  call.  On  failure  an  explanation  will be printed to
21       stderr, obtained from  the  explain_getresgid(3)  function,  but  still
22       returns to the caller.
23
24       rgid    The  rgid,  exactly  as to be passed to the getresgid(2) system
25               call.
26
27       egid    The egid, exactly as to be passed to  the  getresgid(2)  system
28               call.
29
30       sgid    The  sgid,  exactly  as to be passed to the getresgid(2) system
31               call.
32

RETURN VALUE

34       The explain_getresgid_or_die function  only  returns  on  success,  see
35       getresgid(2)  for  more  information. On failure, prints an explanation
36       and exits, it does not return.
37
38       The explain_getresgid_on_error function always returns the value return
39       by the wrapped getresgid(2) system call.
40

EXAMPLE

42       The explain_getresgid_or_die function is intended to be used in a fash‐
43       ion similar to the following example:
44              explain_getresgid_or_die(rgid, egid, sgid);
45

SEE ALSO

47       getresgid(2)
48               get real, effective and saved group IDs
49
50       explain_getresgid(3)
51               explain getresgid(2) errors
52
53       exit(2) terminate the calling process
54
56       libexplain version 1.4
57       Copyright (C) 2012 Peter Miller
58
59
60
61                                                   explain_getresgid_or_die(3)
Impressum