Storing pid file for a daemon run as user

后端 未结 3 1827
执念已碎
执念已碎 2021-01-11 11:09

Is there a preferred place to store a pid file for a daemon that\'s run as a user? /var/run is the standard place, but this is for a user daemon so it doesn\'t have write pr

3条回答
  •  死守一世寂寞
    2021-01-11 11:36

    The XDG Basedir specification defines where you should store these.
    The variable $XDG_RUNTIME_DIR defines it's location, although it has no default.
    The most common fallback (if the variable is unset) is /tmp/service-$USER.id.

    This helps keep uncluttered homedirs, while keeping all runtime data in

提交回复
热议问题