Force an application to respect advisory file locking

Need help with C, C++, perl, python, etc?

Force an application to respect advisory file locking

Postby nasbas » 2006-12-14 17:30

Hi all,
this is not a real programming question but the problem showed up while I was programming...
When I create perl-scripts that read or write files, I always use advisory file locking (flock), to prevent that this file is been read by one script while another script is just writing this file. Works great as long as only my own perl-scripts access this file.
Now I wonder what to do, when other applications (f.e. vi, sftpd or libxml2) read or write this file. Can I somehow force these applications to respect the locking?
I didn't find any information about this. None of the applications seems to support a flag or a configuration parameter to let the user set "respectfilelocking = yes" (or so). And even noone wants to talk about this problem. Am I missing something? Is this problem solved or isn't it a problem?
Posts: 1
Joined: 2006-12-14 16:14

Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests