GETEGID(3P)
β¨ GETEGID(3P) β¨
okay bestie, quick lil heads up before we dive in β this is the POSIX Programmer's Manual version of this page, mwah π
πΈ PROLOG πΈ
so like, this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so like, go check the corresponding Linux manual page for the deets on Linux behavior, iykyk), or honestly the interface might just not be implemented on Linux at all. π no cap.
π NAME π
getegid β get the effective group ID. that's it, that's the whole vibe. she does one thing and she ate. π
π SYNOPSIS π
#include <unistd.h>
gid_t getegid(void);
π¦ DESCRIPTION π¦
okay so the getegid() function shall return the effective group ID of the calling process. like, that's her whole job and she's obsessed with it. π
and important lil note, bestie: the getegid() function shall not modify errno. she leaves errno exactly how she found it. respectful queen. periodt. β¨
β RETURN VALUE β
the getegid() function shall always be successful β like, there is literally no return value reserved to indicate an error. she doesn't do errors, she does results. main character energy fr fr. π
π ERRORS π
No errors are defined. π
The following sections are informative. (translation: the rest of this page is just lore, not requirements. but we still reading it, bestie. π)
π EXAMPLES π
None. π she's too iconic for examples I guess.
π APPLICATION USAGE π
None. π«Ά
π§ RATIONALE π§
so in a conforming environment, getegid() will always succeed. that's the tea. β
but listen β it is possible for implementations to provide an extension where a process in a non-conforming environment will not be associated with a user or group ID. kinda wild ngl.
and it's recommended that such implementations return (gid_t)-1 and set errno to indicate such an environment. and before you come for them β doing so does not violate this standard, since such an environment is already an extension. so it's giving "rules for thee but this was never the rules anyway." π
π₯ FUTURE DIRECTIONS π₯
None. no glow-up planned, she's already perfect. π
πΈ SEE ALSO πΈ
geteuid()getgid()getuid()setegid()seteuid()setgid()setregid()setreuid()setuid()
and also, from the Base Definitions volume of POSIX.1β2017: <sys_types.h>, <unistd.h>. π
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.
In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. like, they're the final boss, no debating. π«‘
The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie!! πβ¨ππ¦πΈπ π«Ά this lil icon was brought to you by IEEE/The Open Group, 2017 β yeah, 2017 said "let me drop this and change lives." she ate and left no crumbs. mwah, ily, go check your effective group ID. ππβ
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms