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!
Thank you! On 6/28/05, Neil Bower <[EMAIL PROTECTED]> wrote: > On Tue June 28 2005 09:24, Stephen Cartwright wrote: > > So why the need for both files though... The file dosen't have to be > > empty to be used as a lock... Why not just create a pid file and check > > that instead of having one file to just hold the pid and another file > > just to lock -- I'm just trying to determine if there is a specific > > reason or it just has developed that way. Also just to be clear -- the > > application is responsable for creating the pid file right? > > > > Just a guess here, but I do believe the pid file is associated with the > process or executible, whereas the lock file is associated with the data > file. > > You may have one pid file associated with a running process, but this process > may be accessing or modifying several different data files that you would > want to lock off from other processes to prevent corruption. The pid file > will not change for the duration the process is running, but the data files > may be locked at different times. > > Hope this helps, > > Neil > > -- > Neil Bower > CLUG - http://clug.ca > Registered Linux User # 323470 > ( http://counter.li.org ) > > > _______________________________________________ > 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 > > > _______________________________________________ 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

