Message100827
This issue is not related to subprocess, subprocess is just used in examples to show the bug. The problem is that Python defines an invalid sys.executable if the process was created with a custom argv[0]. In Python trunk, the site module now uses sysconfig which depends on sys.executable. If sys.executable, sysconfig fails, site import fails, and finally Python exists (since my fix for #3137). I think that we have to split the problem in two parts:
1) Python startup fails if sysconfig raises an error
2) sys.executable is invalid is argv[0] is modified
(1) Functions using (indirectly) sysconfig in site module:
- addbuilddir()
- addusersitepackages()
I don't know if Python should exits with an error if these functions fail.
(2) Except of Python unit test, is it required in "real world" applications? I know that Twisted does modify argv[0] to display "twistd" in process list. It looks like there is trivial, portable and/or reliable solution for this problem. |
|
Date |
User |
Action |
Args |
2010-03-11 02:01:45 | vstinner | set | recipients:
+ vstinner, pitrou, schmir, tarek, jnoller, ezio.melotti, flox |
2010-03-11 02:01:44 | vstinner | set | messageid: <1268272904.99.0.753341780497.issue7774@psf.upfronthosting.co.za> |
2010-03-11 02:01:43 | vstinner | link | issue7774 messages |
2010-03-11 02:01:42 | vstinner | create | |
|