On Ubuntu or *nix systems is there a convention to store Unix Domain Socket files in a specific directory? I've seen applications store it in /tmp
, but I thought /tmp
can get periodically cleared, no?
1 Answer
None other than the application creating a file in /tmp should remove the file. It's is somewhat common to offer the option to clear /tmp on boot, but this must be enabled by the administrator.
My distro will usually put sockets as well as pidfiles in /var/run/appname.
For reference:
Gentoo Development Guide: Filesystem
Filesystem Hierarchy Standard
FreeBSD direcotry structure
None of these tell you where to put sockets, but they all point to /var as a general purpose folder for stuff created by processes at runtime.