Start multiple listening servers in one file

MRAB google at mrabarnett.plus.com
Fri Jan 16 12:59:48 EST 2009


Thomas W wrote:
> I`m working on a django-project where I`m using the awsome pyftpdlib 
> for ftpserver-functionality. I also have a simple worker deamon 
> running in the background, but not listening to any port. How can I 
> start all of these processes on one file? Tried using subprocess and 
> popen but that resulted in an eternal loop starting the servers over 
> and over until all resources were used, then crash.
> 
> Any hint on how to do this would be highly appreciated.
> 
Do you mean that your script is invoking itself? If yes, then could you
pass something on the commandline to say "you're not the initial
instance, so don't invoke yourself" and then check that?



More information about the Python-list mailing list