Have 10mins to deepen your understanding of #Unix like systems?
Check the utistd.h page. This is the header file that provides access to the POSIX operating system API. Even a quick browse can show you how your program talks with your OS.
For example whenever your program needs a higher privilege (or to act as another user), it calls `setuid` for that. Or starts with `sudo/doas` to have a higher access but calls `setuid` to become "nobody" in most of its life cycle.
If still have a click to spare, check the setuid.h on #OpenBSD man pages:
setuid(2) - OpenBSD manual pages
in most cases OpenBSD man pages are the best references you need to understand the OS.
#BSD #Linux