Ticket #1640 defect new
Child process environment cannot be fully overridden on Windows
| Reported by: | bwh | Owned by: | teratorn |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | win32 |
| Cc: | teratorn, jknight, Trent.Nelson, exarkun | Branch: | |
| Author: | Launchpad Bug: |
Description
twisted.internet.win32eventreactor.Process.__init__ does this:
# Add the specified environment to the current environment - this is
# necessary because certain operations are only supported on Windows
# if certain environment variables are present.
env = os.environ.copy()
env.update(environment or {})
whereas twisted.internet.process.Process passes the given environment dictionary to os.execve unaltered.
The comment applies just as well as to Posix systems as to Windows (for example LD_*, HOME, locale variables), and I don't see that it justifies this inconsistency. The worst aspect of this behaviour is that it makes it impossible to un-define variables in a child process that are defined in the parent process.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

