envuidgid(8)

πŸ“¦
version 0.76 Β· 2 versions
  • 0.76 Β· debian bookworm, debian trixie, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.11 Β· alpine 3.24
, in debian bookworm, debian trixie, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– envuidgid(8) β€” System Manager's Manual πŸ’–

okay bestie, gather round, because envuidgid from the System Manager's Manual is about to become your new fave and it's literally so simple it's giving main character energy 🫢


✨ NAME ✨

envuidgid β€” runs another program with environment variables indicating a specified account's uid and gid.

like. that's the whole vibe. it tells your child process who it is. no cap. πŸ’…


🌸 SYNOPSIS 🌸

envuidgid account child

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜•

account is a single argument. one. just one. don't be out here trying to sneak two in, it's not that kind of party πŸ™ˆ

child consists of one or more arguments. so that one can be a whole lil squad if you want πŸŽ€

then the magic happens:

envuidgid sets $UID to account's uid and $GID to account's gid. and then β€” after all that glow-up β€” it runs child. ✨

that's it. that's the function. iconic behaviour, honestly. πŸ‘‘


πŸ”₯ EXIT CODES πŸ”₯

ok so listen, because this part matters and I need you to actually pay attention πŸ’€

envuidgid exits 111 if any of these cursed things happen:

  • it cannot find a UNIX account named account 😭 (typo? nonexistent user? tragic.)
  • it runs out of memory for environment variables πŸ’€
  • it cannot run child πŸ™ˆ

Otherwise β€” and this is the good timeline β€” its exit code is the same as that of child. so whatever child says, envuidgid says. it's a hype woman, not a decision maker. periodt. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

the whole daemontools friend group, all of them, no one left out 🫢

supervise(8), svc(8), svok(8), svstat(8), svscanboot(8), svscan(8), readproctitle(8), fghack(8), pgrphack(8), multilog(8), tai64n(8), tai64nlocal(8), setuidgid(8), envdir(8), softlimit(8), setlock(8)

and if you wanna go down the rabbit hole bestie, the mothership is right here:

http://cr.yp.to/daemontools.html 🌈


okay that's the whole page!! it's envuidgid(8) from the System Manager's Manual, and that's genuinely everything β€” go set some env vars and slay πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from