Reputation: 9114
I have a python daemon that runs on linux. I'm implementing an auto updating functionality which works this way:
So my question is how can I launch updater script in a way that it won't depend on parent process. In other words, I don't want parent process termination to cause child process termination.
Environment: Linux mint 16
Python 3.3
Thanks
Upvotes: 0
Views: 144
Reputation: 2015
You could do something along the lines of:
from subprocess import Popen
updater = ['/usr/bin/python', '{PATH TO}/updater_script.py', '&']
Popen(updater)
The updater won't be affected by the deamon closing.
Upvotes: 1