Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: How to make sure that non-Perl programs will respect Perl's file locking?by Perl Mouse (Chaplain) |
on Jan 12, 2006 at 00:03 UTC ( [id://522590]=note: print w/replies, xml ) | Need Help?? |
You want a mandatory lock that the system enforces.No you don't. At least, not in general. Just suppose you have mandatory file locking. Consider a (user) program that opens /etc/passwd and acquires a read lock. You can't prevent that as /etc/passwd needs to be readable by all. As long as the program keeps the lock, noone could acquire an exclusive lock on /etc/passwd, so no modifications to the user of the machine are possible. Believe me, you don't want system-wide mandatory locking.
Perl --((8:>*
In Section
Seekers of Perl Wisdom
|
|