Message42921
| Author |
bernhard |
| Recipients |
| Date |
2003年02月28日.20:21:27 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
The patch provides a way to specify the environment for
the subprocess run by the popen2, popen3 and popen4
functions in the popen2 module on platforms that use
the Popen3 class. It does that by adding this parameter
to the __init__ method of Popen3 and the popenN
functions calling execvpe in _run_child if the env
parameter was not None.
This patch obviously doesn't add this parameter on e.g.
Windows. AFAICT from posixmodule.c where popen is
implemented via CreateProcess on Windows it would be at
least theorectically possible to implement it on
Windows as well. I don't have the need nor the time for
that unfortunately.
Being able to specify the environment for the
subprocess in popen is very useful for e.g. running a
CGI from Zope. ZCGI for instance modifies os.environ so
that the subprocess inherits it but that cause problems
because other threads may occasionally see a modified
environment. This is particularly bad for the oracle
client libraries on Linux which require certain
environment settings.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 15:20:49 | admin | link | issue695275 messages |
| 2007年08月23日 15:20:49 | admin | create |
|