envuidgid(8)
π 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
- debian bookworm: daemontools 1:0.76-8.1 Β· LicenseRef-public-domain
- debian trixie: daemontools 1:0.76-14 Β· LicenseRef-public-domain
- nixpkgs unstable: daemontools 0.76
- ubuntu jammy: daemontools 1:0.76-7
- ubuntu noble: daemontools 1:0.76-10 Β· LicenseRef-public-domain
- ubuntu questing: daemontools 1:0.76-15
- ubuntu resolute: daemontools 1:0.76-15build1 Β· LicenseRef-public-domain
- ubuntu stonking: daemontools 1:0.76-15build1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms