RHEL7/CentOS7 has a dedicated folder: $XDG_RUNTIME_DIR (e.g. /run/user/1000) for pid files, that folder is a tmpfs. However RHEL6/CentOS6 does not have $XDG_RUNTIME_DIR.
RHEL6(also RHEL7) has a folder using similar type: /dev/shm. After some testing and searching on Internet, I realize it's convenient place for IPC purpose, and also seems OK to put small pid files in it.
So the question is: Are there any drawbacks of using this folder for the pid files.
(Example of not using other folder like /tmp: there is a crontab job removes pid files every certain days causing service unstable)
Reference:
https://www.cyberciti.biz/tips/what-is-devshm-and-its-practical-usage.html https://wiki.archlinux.org/index.php/tmpfs