Remix.run Logo
MrDarcy 8 hours 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.

merpkz 2 hours ago | parent | next [-]

None 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.

chuckadams 8 hours ago | parent | prev | next [-]

Files 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 7 hours ago | parent [-]

Running squid in the foreground is "-N". It's not hard to find, there is a manpage and everything (ooh, ancient).

parliament32 5 hours ago | parent | prev [-]

It 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.