4 ms·
What is the purpose of putting the pid file into /dev/shm ? I’ve never seen that before and am curious to learn more about the technique.
by MrDarcy 10mo ago
What is the purpose of putting the pid file into /dev/shm ? I’ve never seen that before and am curious to learn more about the technique.
- chuckadams 10mo agoFiles in /dev/shm go away on reboot. Using a PID file at all in kubernetes is kind of odd (containerized things tend to run in the foreground as PID 1), but given squid's age, I imagine it requires it.
- xorcist 10mo agoRunning squid in the foreground is "-N". It's not hard to find, there is a manpage and everything (ooh, ancient).
- parliament32 10mo agoIt ensures that if another process is spawned, it knows there's already a running process and refuses to run. An old school leader-election lease, in a sense. It's not necessary in a containerized (read: non-daemonized) environment.
- merpkz 10mo agoNone that I can remember, I was probably just testing something outside container and left it like that. Now checking there is /run/squid created by Alpine so that could be used too.