On June 27, 2005 10:47 am, Stephen Cartwright wrote:
> What exactly is the difference between a pid file and a subsystem lock
> file? Why do you need both of them?
>
> Thanks!

A *.pid file is a file that keeps the PID "process id" and that is to record 
which process to send signals to for various reasons, ie. killing the process 
(thats not the only reason, but the most common one).

What a lock file is for is to signal that a particular resource is in use. 
Lets say that some program wanted to update /etc/passwd.  One way of making 
sure that two programs are not updating that file is to create a file 
ie. /var/lock/etc/passwd.  When the program is finished updating the file it 
removes the file in /var/lock.  BTW without getting the source I'm not sure 
how they handle that.  If you are curious get the package called 
util-linux.tar.gz from kernel.org.  There are several utilities in that 
package that have to cope with updating sensitive information like the 
passwords.  Check it out.

_______________________________________________
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

Reply via email to