in reply to How to make sure that non-Perl programs will respect Perl's file locking?

Hi

This is not like locking the file when the Othere program tries to modify the file.

Please see the below definition

LOCK_SH Place a shared lock. More than one process may hold a shared lock for a given file at a given time. LOCK_EX Place an exclusive lock. Only one process may + hold an exclusive lock for a given file at a given tim +e. LOCK_UN Remove an existing lock held by this process.
The possible ways of checking the locks :-

Having a ENVIRONMENT Variable that will check for the locking Mechanism. ( Set and Unset the Variable )

Lock file Mechanism

"Keep pouring your ideas"
  • Comment on Re: How to make sure that non-Perl programs will respect Perl's file locking?
  • Download Code