How do I implement a simple cross platform Python daemon?

前端 未结 5 1596
执笔经年
执笔经年 2021-01-31 10:27

I would like to have my Python program run in the background as a daemon, on either Windows or Unix. I see that the python-daemon package is for Unix only; is there an alternati

5条回答
  •  旧时难觅i
    2021-01-31 10:48

    In general the concept of a daemon is Unix specific, in particular expected behaviour with respect to file creation masks, process hierarchy, and signal handling.

    You may find PEP 3143 useful wherein a proposed continuation of python-daemon is considered for Python 3.2, and many related daemonizing modules and implementations are discussed.

提交回复
热议问题