With this only the env vars set using export or explicitly specify for a
service are passed to services (in addition to RUST_BACKTRACE, PATH and
LD_LIBRARY_PATH). As such we no longer need to manually unset bootloader
env vars to keep the environment clean. And finally this means that env
var substitutions in shell scripts always use the bootloader provided
env vars rather than locally specified ones.
This does regress multi monitor support when there is no proper graphics
driver.
The working directory doesn't matter for services and login sessions
already cd to the user home directory. This removes one source of global
state manipulation.
This sets PATH, LD_LIBRARY_PATH and runs init scripts for the new root.
In the future this could replace the entire set of services that should
run, restarting any services for which a newer executable is available
in the new root and stopping any services which don't exist in the new
root. This behavior could also be useful for soft-reboots in the future
to handle updates without rebooting the entire system.
Unfortunately the scheme still has to be created by the daemon due to a
kernel bug, but once that is fixed, it would allow delayed spawning of
scheme daemons.
This removes one piece of state that init has to manage for the
processes it spawns. This also allows getting rid of the concept of a
default scheme from relibc if we want.
The stdout and stderr of the spawned processes are not captured by init,
so attempting to write captured input is useless. Also show the exit
code in case the child process returned an non-zero exit code.