std.env [core] std.env.cwd pub fn cwd() -> str ! {io} — The process's working directory: the directory every relative path resolves against and every child starts in. std.env.set_cwd pub fn set_cwd(path: str) -> () ! {not_found, denied, io} — Make path the process's working directory. std.env.umask pub fn umask(mask: int) -> int ! {invalid, unsupported} — Set the process's file mode creation mask to mask, and answer the mask it replaced. std.env.pid pub fn pid() -> int — s232 ([os.proc.self]): this process's id — a shell's $$, and what a pid file holds. std.env.ppid pub fn ppid() -> int ! {unsupported} — s232 ([os.proc.self]): the id of this process's parent, NOW — a shell's $PPID. std.env.uid pub fn uid() -> int ! {unsupported} — s236 ([os.proc.ids]): this process's REAL user id — who started it (getuid). std.env.euid pub fn euid() -> int ! {unsupported} — s236 ([os.proc.ids]): this process's EFFECTIVE user id — the one the host checks when the process opens a file, signals another process or changes an owner (geteuid). std.env.gid pub fn gid() -> int ! {unsupported} — s236 ([os.proc.ids]): this process's real group id (getgid). std.env.egid pub fn egid() -> int ! {unsupported} — s236 ([os.proc.ids]): this process's effective group id (getegid) — the group a file it creates is given on most hosts. std.env.groups pub fn groups() -> List[int] ! {io, unsupported} — s236 ([os.proc.ids]): this process's SUPPLEMENTARY groups — the other groups the host counts it a member of, exactly as the host lists them (getgroups), in the host's order. std.env.args pub fn args() -> List[str] — The program's arguments, in the order the user gave them. std.env.arg pub fn arg(i: int) -> str ! {none} — The argument at i, counting from zero. std.env.arg0 pub fn arg0() -> str — The name this program was invoked by: argv[0], exactly as the invoker spelled it (a bare PATH name, an absolute path, ./prog, a symlink's own name, exec -a NAME's NAME). std.env.args_bytes pub fn args_bytes() -> List[List[byte]] — Every argument as bytes, the invocation name first: argv[0], then argv[1..] in order — so args_bytes().len is args().len + 1 whenever the invoker passed a name. std.env.get pub fn get(name: str) -> str ! {missing, utf8} — The value of the environment variable name. std.env.has pub fn has(name: str) -> bool — Whether get(name) would answer with a value. std.env.vars pub fn vars() -> List[str] — Every environment variable the host has, as K=V lines sorted by name. std.env.set pub fn set(name: str, value: str) -> () ! {invalid} — Set the environment variable name to value for this process. std.env.unset pub fn unset(name: str) -> () ! {invalid} — Remove name from this process's environment. std.env.entry_key pub fn entry_key(entry: str) -> str — The name half of a K=V line from vars(). std.env.entry_value pub fn entry_value(entry: str) -> str — The value half of a K=V line from vars().