开发者

what's the difference in effect of backgrounding vs forking?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜