[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Origin of /var/run contents



Dave Sherohman:

Or should I be going about this in a completely different manner?


Yes.

[Service]
Type=simple
User=starman
RuntimeDirectory=starman

And simply do not use the --pid and --daemonize options in the first place. You are using a service manager that tracks child processes and that runs things in dæmon context to begin with. Employing the rickety and dangerous PID file mechanism and vain attempts at self-dæmonization is quite wrong.

* http://jdebp.eu./FGA/unix-daemon-design-mistakes-to-avoid.html#DoNotCreatePIDFiles

* http://jdebp.eu./FGA/unix-daemon-design-mistakes-to-avoid.html#DoNotBackgroundise



Reply to: