diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-03-22 18:56:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 18:56:26 (GMT) |
commit | c959fa9353b92ce95dd7fe3f25fe65bacbe22338 (patch) | |
tree | e19133af7da40d79fa702460ea23345e018acbf6 /Python | |
parent | 687f5921a46cf95c2a648d8031f9e99cdcc3e6b7 (diff) | |
download | cpython-c959fa9353b92ce95dd7fe3f25fe65bacbe22338.zip cpython-c959fa9353b92ce95dd7fe3f25fe65bacbe22338.tar.gz cpython-c959fa9353b92ce95dd7fe3f25fe65bacbe22338.tar.bz2 |
bpo-22490: Remove __PYVENV_LAUNCHER__ from environment during launch (GH-9516) (GH-19110)
* bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS
This changeset removes the environment varialbe "__PYVENV_LAUNCHER__"
during interpreter launch as it is only needed to communicate between
the stub executable in framework installs and the actual interpreter.
Leaving the environment variable present may lead to misbehaviour when
launching other scripts.
* Actually commit the changes for issue 22490...
* Correct typo
Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>
* Run make patchcheck
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
(cherry picked from commit 044cf94f610e831464a69a8e713dad89878824ce)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Diffstat (limited to 'Python')
-rw-r--r-- | Python/initconfig.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Python/initconfig.c b/Python/initconfig.c index a0b2691..a930b5d 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -1144,6 +1144,17 @@ config_init_program_name(PyConfig *config) if (_PyStatus_EXCEPTION(status)) { return status; } + + /* + * This environment variable is used to communicate between + * the stub launcher and the real interpreter and isn't needed + * beyond this point. + * + * Clean up to avoid problems when launching other programs + * later on. + */ + (void)unsetenv("__PYVENV_LAUNCHER__"); + return _PyStatus_OK(); } } |