I would like to create a process using the mutliprocessing module in python but ensure it continues running after the process that created the subprocess exits.
I can get the required functionality using the subprocess module and Popen, but I want to run my code as a function, not as a script. The reason I want to do this is to simplify creating pyro (python remote objects) objects. I want to start the pyro object request handler in a separate process using multiprocessing, but then I want the main process to exit while the process supporting the pyro object continues to run.
I finally got what I wanted. I appreciate any suggestions to improve the code.
What you're trying to do is start a daemon process. Look at PEP-3143, and the python-daemon package.
Took a look into Pyro, and it seems they include their own daemonzing module,