[Python-Dev] Issue 13524: subprocess on Windows (original) (raw)
Tim Golden mail at timgolden.me.uk
Mon Dec 5 10:01:17 CET 2011
- Previous message: [Python-Dev] Issue 13524: subprocess on Windows
- Next message: [Python-Dev] Issue 13524: subprocess on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 05/12/2011 08:10, "Martin v. Löwis" wrote:
I agree with Nick that we shouldn't do anything except perhaps for documentation changes. There are many other environment variables whose absence could also cause failures to run the executable, such as PATH, LDLIBRARYPATH, etc. Even not passing DISPLAY may cause the subprocess to fail starting.
IOW, users should "normally" pass all environment variables, and only augment it with any specific additions and deletions that they know are needed for the subprocess. If a user deliberately passes a small set of environment variables (e.g. none), we must assume that it was deliberate, and that any resulting failures are desired. People do such stuff for security reasons, and side-stepping their enforcement is not appropriate for Python to do.
Having slept on this I must confess that this is pretty much the conclusion I'd come to: we can't do anything in code which is guaranteed to be correct in every case. The best we can do is document. And, as Martin Packman pointed out (and I had missed), this particular condition is already documented, at least enough to point a user to.
We could probably do with a HOWTO (or blog post or whatever) on using subprocess on Windows, not least because a fair amount of the docs are Unix-centric and actually very slightly confusing for naive Windows-based developers.
I think my proposal now is: do nothing. I'm aware that Nick Coghlan has been making fairly extensive changes to the subprocess docs recently and I don't I can propose anything on this matter which amounts to more than shuffling the pieces around.
TJG
- Previous message: [Python-Dev] Issue 13524: subprocess on Windows
- Next message: [Python-Dev] Issue 13524: subprocess on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]