Michael Rushton
M.J.D.Rushton at btinternet.com
Fri Jun 3 14:56:23 EDT 2005
Hello, What is the best way to spawn a process from a mod_python that could take several hours to complete? I am trying to write a handler that when accessed for the first time spawns a long running process that writes to a file. On subsequent accesses, the handler would show the contents of the file produced by the long process, refreshing the page occasionally with meta refresh tags. I have had a stab at achieving this by double forking the process. This however, has had the disadvantage that for really long running processes the forked processes still seem to be bound to port 80 thus preventing httpd daemon restarts. A problem when you want to update apache configuration settings. What am I doing wrong? And what is the accepted way for spawning long lived processes from mod_python? I would be very grateful if someone could point me to some source examples that show how to achieve this. Kind Regards, Michael Rushton
|