I upgraded a Debian box from stable to Jessie and I noticed that SHELL is no longer exported, so screen and similar programs start dash for subshells instead of bash.
When was this change made and why?
A long, long time ago:
This document details the changes between this version, bash-2.05a-rc1, and the previous version, bash-2.05a-beta1.
- Changes to Bash
w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it gives them default values if they don't appear in the initial environment.
I don't know what the reason is, but it makes sense: there's no reason that running a bash script should set
SHELL for inferior processes if it was unset. Bash only exports
PWD (because it's supposed to, for whatever good that does),
OLDPWD (the companion of
SHLVL (which is supposed to always be set by shells).
SHELL is normally set to your login shell is that it's set in the environment by the login program (
sshd, etc.). This should still be the case in jessie. If some login method doesn't set
SHELL, that's probably a bug in the login method.