Next: , Previous: POSIX signals, Up: POSIX interface


8.3 Process environment

These procedures are exported by the structures posix & posix-process-data.

— procedure: get-process-id –> process-id
— procedure: get-parent-process-id –> process-id

These return the process id of the current process or the current process's parent, respectively.

— procedure: get-user-id –> user-id
— procedure: get-effective-user-id –> user-id
— procedure: set-user-id! user-id –> unspecified
— procedure: get-group-id –> group-id
— procedure: get-effective-group-id –> group-id
— procedure: set-group-id! group-id –> unspecified

These access the original and effective user & group ids of the current process. The effective ids may be set, but not the original ones.

— procedure: get-groups –> group-id list
— procedure: get-login-name –> string

Get-groups returns a list of the supplementary groups of the current process. Get-login-name returns a user name for the current process.

— procedure: lookup-environment-variable string –> string or #f
— procedure: environment-alist –> alist

Lookup-environment-variable looks up its argument in the environment list of the current process and returns the corresponding string, or #f if there is none. Environment-alist returns the entire environment as a list of (name-string . value-string) pairs.