Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
This is like `id -G` on Linux, but it's too hard to find a portable equivalent.
Definition in file getgroups.c.
|
Definition at line 34 of file getgroups.c.
00035 { 00036 int n, i; 00037 gid_t list[NGROUPS]; 00038 00039 if ((n = getgroups(NGROUPS, list)) == -1) { 00040 perror("getgroups"); 00041 return 1; 00042 } 00043 00044 for (i = 0; i < n; i++) 00045 printf("%u ", list[i]); 00046 printf("\n"); 00047 00048 return 0; 00049 } |