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():
print "Got 'p' of", p
if __name__ == '__main__':
if len(sys.argv) == 2 and sys.argv[1] == '-m':
p = Process(target=test)
p.start()
p.join()
else:
test()
Running this in SP and MP mode shows the leakage:
ssmith$ /opt/python-svn/bin/python mpbug.py
Got 'p' of Correct
ssmith$ /opt/python-svn/bin/python mpbug.py -m
Got 'p' of <Process(Process-1, started)>
This occurs in both 2.6b3 and trunk.
----------
components: Library (Lib)
messages: 72662
nosy: TarkaSteve
severity: normal
status: open
title: Module variable overridden in child processes with multiprocessing
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3792>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com