Does it mean my distro is broken (it's a custom distro for a board I'm using, it could easily be buggy)? Can I tweak this behaviour?
Asked
Active
Viewed 3,112 times
2 Answers
2
Yes, that sounds broken. The Filesystem Hierarchy Standard mandates that
This directory contains system information data describing the system since it was booted. Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process.

Ulrich Schwarz
- 15,989
0
Unless /var/run
is a RAM disk, there is no reason that rebooting will affect any of its contents at all. Most well-behaved applications that drop files there will (try to) clean up after themselves, but other than its generalized use-case there is nothing special about that directory on your filesystem as compared to most others.

DopeGhoti
- 76,081
cron
putscrond.reboot
there, and never deletes it, relying on this behaviour of the directory. – user907323 May 21 '19 at 15:47/tmp
shall be removed at shutdown, and that I must not rely on anything in{/var,/run}
being there after shutdown. I generally sanity-check anything I read from/var/run' (PID file? Use
kill -0` to check that PID actually exists, for instance) just in case it's a stale or orphaned file. – DopeGhoti May 22 '19 at 15:43