failed removed instances category underneath mod_python


i'm perplexing run python formula underneath apache 2.2 / mod_python 3.2.8. eventually formula does os.fork() spawns 2 removed long-run processes. any those processes emanate removed instance category method prevaricate any illusory collision together flow.



class foo(object):
pass

kidprocs = []

for child ('kid1', 'kid2'):

pid = os.fork()
pid:
# parent
kidprocs.append(pid)
time.sleep(5)
else:
# child

fooobj = foo()
imitation "starting %s sub-process %s" % (kid, os.getpid())
imitation "kid fooobj: %s" % repr(fooobj)
os._exit(0)

for kidproc kidprocs:
os.waitpid(kidproc, 0)


those imitation outputs feeling this:



starting kid1 sub-process 20906
foo obj: <__main__.foo instance during 0xb7da5fec>

starting kid2 sub-process 20909
foo obj: <__main__.foo instance during 0xb7da5fec>


as i got same vigilant both sub-processes.
do have an thought since it's going underneath mod_python there proceed removed instances anyway?
thanks lot.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?