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>. πŸ“š


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