emptyenv - empty the current environment, or clean it up; then execute a program


EMPTYENV(1) BSD General Commands Manual EMPTYENV(1)

NAME

emptyenv — empty the current environment, or clean it up; then execute a program

SYNOPSIS

emptyenv [−p] prog...
emptyenv −c
prog...
emptyenv
[−o] [−P] prog...

DESCRIPTION

By default, emptyenv unsets all environment variables, then exec(3)s into prog with its arguments. Options control which environment variables are unset.

OPTIONS
−p

Keep the PATH environment variable.

−c

Clean up. Do not empty the environment. Instead, remove every variable used internally by the execline programs, to avoid any interference with or information leakage to external programs.

−o

Pop (

cf. execline-pushenv(7) ) environment variables starting with ‘ELGETOPT_’. You might want to do this before executing a final program from a script that uses elgetopt(1).

−P

Pop (

cf. execline-pushenv(7) ) environment variables starting with ‘#’, ‘0’ to ‘9’, and ‘EXECLINE_’. You might want to do this before executing a final program from a script launched by execlineb(1).

SEE ALSO

elgetopt(1), envfile(1), exec(1), execline-cd(1), execline-umask(1), execlineb(1), exit(1), export(1), fdblock(1), fdclose(1), fdmove(1), fdreserve(1), fdswap(1), getcwd(1), getpid(1), heredoc(1), piperw(1), posix-cd(1), posix-umask(1), redirfd(1), trap(1), tryexec(1), unexport(1), wait(1), withstdinas(1), execline-pushenv(7)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/emptyenv.html

AUTHORS

Laurent Bercot
Alexis <

[email protected] > (man page port)

BSD February 14, 2021 BSD


Updated 2023-02-15 - jenkler.se | uex.se