Skip to content

Add environment variables

Jeremy Soller requested to merge nounoursheureux:environment_variables into master

Created by: nounoursheureux

Problem: Redox doesn't have environment variables. Each process should have its own set of environment variables, that are copied to the child when the process forks.

Changes introduced by this pull request:

  • Add the env_vars field to the Context struct
  • Add the env scheme to access environment variables from userspace
  • Add the env::var, env::set_var, env::remove_var and env::vars functions to libstd

TODOs:

  • Add a way to remove environment variables (I'm working on it)
  • Maybe add the export command to extrautils.
  • Set the HOME, PWD, etc. variables on login

State: Ready

Merge request reports