Dimitri Vorona wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; i&#39;d like to be able to start additional instances of my server using<br>
&gt; multiprocess module. To do it i just start a new Process with<br>
&gt; mutiprocessing and then create a new instance of my Application there.<br>
&gt; Everything works fine, but i can&#39;t figure out a way to<br>
&gt; stop such a process. If I run reactor.stop() in the child process I<br>
&gt; get an infinite loop of errors looking like this:<br>
&gt;<br><br>This is a very timely discussion for us.  We are trying to launch multiple independent twistedized children with python multiprocess and yes (as Phil noted) we are getting very strange results.  We were aware the multiprocess module does a fork to spawn children but we hoping that this would not be an issue for us because our parent process does NOT start a reactor before spawning the children.  In fact even if our parent process never starts its reactor, as soon as we spawn the 2nd twistedized child, bad things start happening in the children.   The parent does import the child modules in order to start them and since each child module also imports twisted, we are thinking that some twisted state gets established just on the import of the twisted reactor into the parent and then the fork clones that state into the children.<br>
<br>Thanks Phil for the reference to ampoule.   We will look at that next.  We are still hoping to get the parent set up in such a way that whatever the forking :-) shared state is, it does not get established until after the children are spawed. I&#39;ll post back later with what we find.  Phil your thoughts on this would also be appreciated.<br>
<br>Cheers,<br>David<br>