title: Is `/tmp` the right place for UNIX-domain socket files?
body: <p>When using UNIX sockets for IPC communication, a file must be created in the file system. Many examples out there on the Internet suggest <code>/tmp</code> as a good place to place sockets in. Some suggest to use <code>/tmp/specific_folder</code> with <code>700</code> permissions to keep <code>/tmp</code> clean and the sockets safe from other users access.</p>
  
  <p>However, is that reliable? Can't the OS remove any file in there at any moment? Let us suppose those files are to persist in there for days or months and some might not be used for communication during long periods (i.e.: days).</p>
  
  <p>Also, storing those files in a local user folder (for example, in <code>./.hidden_sockets/</code>) has the disadvantage of not cleaning those files in case, for example, the system crashes. Not even after system reboot.</p>
  
  <p>Where would you put those files? Is there a standard/preferred way?</p>