Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://522590]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-19 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found