On my Fedora 20, I find that the system automatically clean up file under /tmp/. This is convenient. However, it cause some problems for some programs.
For example, HDFS puts its DataNode pid file under /tmp/ by default like
hadoop-hadoop-datanode.pid. After it is cleaned up, the
hadoop-daemon.sh script will consider there is no DataNode running.
How to make Fedora Linux not clean some files in /tmp/?
systemd has a systemd-tmpfiles tool that creates, deletes and cleans up volatile and temporary files and directories.
You can control the behavior of the systemd-tmpfiles by configuring its configuration file located at
Check the tmpfiles.d for the format of configuration.
For the purpose of excluding *.pid files, you can add one line as follows
Answered by Eric Z Ma.