def spawnd(path, args, pidfile=None):
"""
Run a command as a daemon. This method is really just shorthand for the
following code:
.. python::
daemonize(pidfile=pidfile)
_os.execv(path, args)
:Parameters:
path : str
Full path to program to run
args : list
List of command arguments. The first element in this list must
be the command name (i.e., arg0).
pidfile : str
Path to file to which to write daemon's process ID. The string may
contain a ``${pid}`` token, which is replaced with the process ID
of the daemon. e.g.: ``/var/run/myserver-${pid}``
"""
daemonize(no_close=True, pidfile=pidfile)
_os.execv(path, args)
os.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录