clearenv — clear the entire environment then chain
clearenv
[--keep-path] [--keep-user] [--keep-shell] [--keep-term] [--keep-locale] {next-prog
}
clearenv is a chain-loading utility that clears the entire environment
and then chain loads to next-prog
with the execvp(3) function.
next-prog
may contain its own command line options, which clearenv will ignore.
When the --keep-path command line option is used, clearenv will not clear the PATH
and LD_LIBRARY_PATH
environment variables.
When the --keep-locale option is used, it will not clear the environment variables used by the GNU C Library for locale settings, namely LANG
, LC_ALL
, LC_COLLATE
. LC_CTYPE
, LC_MESSAGES
, LC_MONETARY
, LC_NUMERIC
, and LC_TIME
.
Similarly --keep-shell stops the clearing of SHELL
; --keep-term stops the clearing of TERM
(7), COLORTERM
, XTERM_VERSION
, VTE_VERSION
, and TTY
; and --keep-user stops the clearing of HOME
, USER
, and LOGNAME
.