On Tuesday 28 June 2005 09:54, Stephen Cartwright wrote: > Normally, I would agree with you completely... However the particular > lock files I am talking about are in /var/lock/subsys (on Red Hat and > Red Hat based distros). The reason I became curious about this is I > had to create an init script and while looking at other init scripts I > realized that many (all the ones I looked at) would "touch" to create > a file in this directory under their start function and then remove it > when the stop function is run. In this case the lock seems to be based > on the process, not a data file. I can't think of any good reason for > this so it is bothering me... Please help!
lock files lock a resource, be that a device file or an abstract concept that only the application understands. pid files are there to keep track of the pids of running daemons. they are for two different purposes; there may be times when a lock is held on a resource for the exact same amount of time that the daemon is running and has a pid file. but there is no real guarantee of that. since having one more file on the filesystem isn't expensive, it's more bullet proof to just rely on what the various files are supposed to be for. this future and/or disaster proofs things. remember that we code for failure, success is a luxury ;) -- Aaron J. Seigo GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
pgpnt9G4DNduw.pgp
Description: PGP signature
_______________________________________________ clug-talk mailing list [email protected] http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List Guidelines (http://clug.ca/ml_guidelines.php) **Please remove these lines when replying

