Does flock work on a mounted directory?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Does flock work on a mounted directory?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Does flock work on a mounted directory?  
cestesteban@yahoo.it


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-18-07 06:27 PM

I am evaluating to use the UNIX flock on files of a remote mounted
directory.
Can different process, working on different machines, flock files on a
remote mounted directory without interfere each other?
Thanx






[ Post a follow-up to this message ]



    Re: Does flock work on a mounted directory?  
Scott Lurndal


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-18-07 06:27 PM

cestesteban@yahoo.it writes:
>I am evaluating to use the UNIX flock on files of a remote mounted
>directory.
>Can different process, working on different machines, flock files on a
>remote mounted directory without interfere each other?
>Thanx
>

Depends.

When you say "remote mounted" are you referring to RFS, NFS, AFS or SMB
as the underlying protocol?

RFS (which nobody supports anymore) had locking support iirc.
NFS supports it if both hosts are running compatible lockd instances.
AFS i'm not sure
SMB (aka CIFS) not likely.

scott





[ Post a follow-up to this message ]



    Re: Does flock work on a mounted directory?  
Chris Friesen


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-19-07 12:19 AM

cestesteban@yahoo.it wrote:

> Can different process, working on different machines, flock files on a
> remote mounted directory without interfere each other?

At least with Linux, flock() is not guaranteed to work with NFS mounts.
fcntl() locks work with NFS, not sure about other network filesystems.

Chris





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:36 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register