acassen / keepalived

Keepalived
https://www.keepalived.org
GNU General Public License v2.0
4.02k stars 736 forks source link

all: Ensure pid file exists when respawning child process #2461

Closed pqarmitage closed 3 months ago

pqarmitage commented 3 months ago

If a child process is respawned, the old pidfile may or may not still exist. If it doesn't exist, we need to recreate it. If it still exists we need to reset our file offset and truncate the file before re-wrighting it.