Storing pid file for a daemon run as user

后端 未结 3 1829
执念已碎
执念已碎 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:34

    I suggest you go for a subdirectory within the user's home directory.

    ~/.programname/.pid
    

    If there is any other user configuration data, you can store that in here too, in order to avoid cluttering up the home directory.

提交回复
热议问题