This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.execv*e(): fix formatting of the environment variables (Python 3.1)
Type: Stage:
Components: Library (Lib) Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, vstinner
Priority: normal Keywords: patch

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 msg103459. 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 msg104175.

(os_execve_env.patch doesn't work if LANG environment variable is not set)
History
Date User Action Args
2022-04-11 14:57:00adminsetgithub: 52758
2010-04-25 22:43:13vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg104176
2010-04-23 23:55:50vstinnersettitle: 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:50vstinnersetfiles: + os_execve_env.patch
title: os.execvpe() -> os.execv*e(): fix formatting of the environment variables
nosy: + Arfrever

messages: + msg104058

keywords: + patch
2010-04-23 22:34:12vstinnercreate