Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: The internals of flock()

by Alex the Serb (Monk)
on Dec 25, 2001 at 12:55 UTC ( #134273=note: print w/replies, xml ) Need Help??


in reply to The internals of flock()

flock combined with LOCK_NB (Non-Blocked) and (LOCK_SH (Shared Lock) or LOCK_EX (Exclusive Lock)) would cause flock to return imediately, like that it would not wait infinately. You could also fork so that the parent would wait to get the lock and the child should do other things and you should be aware that fork does not create another instance of a lock. And if you are doing something using NFS (Network File System) with mounted disks and exported directories with files and if you need locking you can't use flock, there is another one called fcntl.

Hope that this helped a little, if not .. sorry dude! I'm ignorant too!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2022-08-07 19:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?