Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 ( #522590=note: print w/replies, xml ) Need Help??


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.

Perl --((8:>*
  • Comment on Re^2: How to make sure that non-Perl programs will respect Perl's file 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

    I never said anything about a read lock. I don't think a read lock would do any good here. :)

    --
    brian d foy <brian@stonehenge.com>
    Subscribe to The Perl Review

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://522590]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2020-10-23 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (238 votes). Check out past polls.

    Notices?