purge /var/run/*pid ?

Garance A Drosihn drosih at rpi.edu
Tue Jun 21 11:08:42 PDT 2005


At 1:58 AM -0700 6/21/05, Matthew Dillon wrote:
:Humm, it looks like the rc process doesn't invoke "stop"s on shutdown.
:
:in that case maybe /var/run/*.pid files should be purged at end of
:shutdown or start of boot? or maybe all rc scripts should trap SIGTERM
:(and other "terminate process" signals?) to remove their own pid file
:on exit? Thoughts?
:
:does it matter really if rc scripts fork and call another executable,
:or become the daemon themselves?
:
:// George
    I would say that we should probably remove (or try to remove)
    /var/run/*.pid files on boot, if you would like to have a go
    at modifying the scripts.  It could be a little tricky since
    some demons might be started before /var is mounted, and there's
    no point removing the pid files until /var is mounted (and
    also read-write).
Suggest:  touch /var/run/somefile
immediately after /var is mounted read-write.
Later, you can run a 'find' command to remove all /var/run/*.pid
files which are older than /var/run/somefile.
--
Garance Alistair Drosehn            =   gad at xxxxxxxxxxxxxxxxxxxx
Senior Systems Programmer           or  gad at xxxxxxxxxxx
Rensselaer Polytechnic Institute    or  drosih at xxxxxxx




More information about the Bugs mailing list