The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: Mutex in Perl
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 11-12-2007
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline
Disorganised User
 

Join Date: Nov 2007
Location: New Zealand
Posts: 742
Quote:
Originally Posted by superuser84 View Post
Btw, where is the information that the file is locked stored ? How does another process (still using flock) know that a file is locked and has to sleep till unlocked ?
Note: I'm getting a little bit in over my head now so take this with a grain of salt

The flock function makes a flock system call so the OS will handle it - ie the filesystem itself records the lock and polices it.
Reply With Quote