[issue3792] Module variable overridden in child processes with multiprocessing

2008-09-06 Thread Steve Smith
Steve Smith <[EMAIL PROTECTED]> added the comment: Ugh, sorry. Stupidity on the reporter's part. ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3792] Module variable overridden in child processes with multiprocessing

2008-09-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Well, I get the OP's expected result on windows: C:\dev\python\trunk>PCbuild\python_d t.py Got 'p' of Correct C:\dev\python\trunk>PCbuild\python_d t.py -m Got 'p' of Correct This is easy to explain: on Unix, the forked process has a co

[issue3792] Module variable overridden in child processes with multiprocessing

2008-09-06 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I agree; this is the expected behavior. Perhaps you don't understand how globals work in Python? -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker <[E

[issue3792] Module variable overridden in child processes with multiprocessing

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: What do you mean, "overriden"? The behaviour looks totally normal to me. You change the value of "p" before the subprocess is started, so the subprocess inherits the new value, not the old one. -- nosy: +pitrou __

[issue3792] Module variable overridden in child processes with multiprocessing

2008-09-05 Thread Steve Smith
New submission from Steve Smith <[EMAIL PROTECTED]>: The process variable 'p' is leaking into sub-processes when using the multiprocessing modules. The following code demonstrates the problem: import sys from multiprocessing import Process p = 'Correct' def test(): pri