in reply to Re: How to make sure that non-Perl programs will respect Perl's file locking?
in thread How to make sure that non-Perl programs will respect Perl's file locking?
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: How to make sure that non-Perl programs will respect Perl's file locking?
by brian_d_foy (Abbot) on Jan 12, 2006 at 01:45 UTC |