os.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:My-Web-Server-Framework-With-Python2.7 作者: syjsu 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号