Goal: Create a long running process from a python script.
I started with a simple unix/linux daemon in Python. But, then I also created an init script that just sents the python script (with a while loop) into the background like this:
py开发者_JS百科thon test.py &
I'm wondering what the difference, in effect, is between the two of these methods?
note: I understand that one creates a child process, and the other doesn't. My question revolves more around the effect.
They are the same thing. The only difference is the python daemon should set the parent process which means if you kill the parent process the child should die too.
精彩评论