proc-env.texi 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. @node POSIX process environment
  2. @section Process environment
  3. @stindex posix-process-data
  4. These procedures are exported by the structures @code{posix} &
  5. @code{posix-process-data}.
  6. @cindex process ids
  7. @cindex POSIX process ids
  8. @deffn procedure get-process-id @returns{} process-id
  9. @deffnx procedure get-parent-process-id @returns{} process-id
  10. These return the @embedref{POSIX processes, process id} of the current
  11. process or the current process's parent, respectively.
  12. @end deffn
  13. @cindex user ids
  14. @cindex group ids
  15. @cindex POSIX user ids
  16. @cindex POSIX group ids
  17. @deffn procedure get-user-id @returns{} user-id
  18. @deffnx procedure get-effective-user-id @returns{} user-id
  19. @deffnx procedure set-user-id! user-id @returns{} unspecified
  20. @deffnx procedure get-group-id @returns{} group-id
  21. @deffnx procedure get-effective-group-id @returns{} group-id
  22. @deffnx procedure set-group-id! group-id @returns{} unspecified
  23. These access the original and effective @embedref{POSIX users and
  24. groups, user & group ids} of the current process. The effective ids
  25. may be set, but not the original ones.
  26. @end deffn
  27. @deffn procedure get-groups @returns{} group-id list
  28. @deffnx procedure get-login-name @returns{} string
  29. @code{Get-groups} returns a list of the supplementary groups of the
  30. current process. @code{Get-login-name} returns a user name for the
  31. current process.
  32. @end deffn
  33. @cindex environment variables
  34. @cindex POSIX environment variables
  35. @deffn procedure lookup-environment-variable string @returns{} string or @code{#f}
  36. @deffnx procedure environment-alist @returns{} alist
  37. @code{Lookup-environment-variable} looks up its argument in the
  38. environment list of the current process and returns the corresponding
  39. string, or @code{#f} if there is none. @code{Environment-alist}
  40. returns the entire environment as a list of @code{(@var{name-string} .
  41. @var{value-string})} pairs.
  42. @end deffn