1explain_setgroups_or_die(3)Library Functions Manualexplain_setgroups_or_die(3)
2
3
4

NAME

6       explain_setgroups_or_die  -  set  supplementary  group  IDs  and report
7       errors
8

SYNOPSIS

10       #include <libexplain/setgroups.h>
11       void explain_setgroups_or_die(size_t data_size, const gid_t *data);
12       int explain_setgroups_on_error(size_t data_size, const gid_t *data);
13

DESCRIPTION

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

RETURN VALUE

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

EXAMPLE

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

SEE ALSO

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