1explain_getgroups_or_die(3)Library Functions Manualexplain_getgroups_or_die(3)
2
3
4

NAME

6       explain_getgroups_or_die  -  get  supplementary  group  IDs  and report
7       errors
8

SYNOPSIS

10       #include <libexplain/getgroups.h>
11       void explain_getgroups_or_die(int data_size, gid_t *data);
12       int explain_getgroups_on_error(int data_size, gid_t *data);
13

DESCRIPTION

15       The explain_getgroups_or_die function is used to call the  getgroups(2)
16       system  call.  On  failure  an  explanation  will be printed to stderr,
17       obtained from the explain_getgroups(3) function, and then  the  process
18       terminates by calling exit(EXIT_FAILURE).
19
20       The  explain_getgroups_on_error  function  is  used  to  call  the get‐
21       groups(2) system call. On failure an explanation  will  be  printed  to
22       stderr,  obtained  from  the  explain_getgroups(3)  function, but still
23       returns to the caller.
24
25       data_size
26               The data_size, exactly as to be passed to the getgroups(2) sys‐
27               tem call.
28
29       data    The  data,  exactly  as to be passed to the getgroups(2) system
30               call.
31

RETURN VALUE

33       The explain_getgroups_or_die function only returns on success, see get‐
34       groups(2)  for  more information. On failure, prints an explanation and
35       exits, it does not return.
36
37       The explain_getgroups_on_error function always returns the value return
38       by the wrapped getgroups(2) system call.
39

EXAMPLE

41       The explain_getgroups_or_die function is intended to be used in a fash‐
42       ion similar to the following example:
43              explain_getgroups_or_die(data_size, data);
44

SEE ALSO

46       getgroups(2)
47               get/set list of supplementary group IDs
48
49       explain_getgroups(3)
50               explain getgroups(2) errors
51
52       exit(2) terminate the calling process
53
55       libexplain version 0.40
56       Copyright (C) 2009 Peter Miller
57
58
59
60                                                   explain_getgroups_or_die(3)
Impressum