Issue 8512: os.execv*e(): fix formatting of the environment variables (Python 3.1) (original) (raw)

Issue8512

Created on 2010-04-23 22:34 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
os_execve_env.patch vstinner,2010-04-23 22:40
Messages (2)
msg104058 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-04-23 22:40
os.execve() and os.execvpe() of Python 3.1 eats some bytes of the environment variables: see . The problem is that it counts *characters* to allocate the *byte* string buffer. Attached patch fixes this issue. It contains a test which may stay specific to Python 3.1 because Python 3.2 have its own test for non-ASCII environment variables: test_undecodeable_env in test_subprocess (introduced by #8391). See also #8391.
msg104176 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-04-25 22:43
I choosed to backport #8391 fix to Python 3.1 (which is better) instead of writing a custom (shorter but incomplete) patch for Python 3.1: see . (os_execve_env.patch doesn't work if LANG environment variable is not set)
History
Date User Action Args
2022-04-11 14:57:00 admin set github: 52758
2010-04-25 22:43:13 vstinner set status: open -> closedresolution: fixedmessages: +
2010-04-23 23:55:50 vstinner set title: os.execv*e(): fix formatting of the environment variables -> os.execv*e(): fix formatting of the environment variables (Python 3.1)
2010-04-23 22:40:50 vstinner set files: + os_execve_env.patchtitle: os.execvpe() -> os.execv*e(): fix formatting of the environment variablesnosy: + Arfrevermessages: + keywords: + patch
2010-04-23 22:34:12 vstinner create