Hi,

In my case i am updating same SDBM file at the same time by executing multiple programs. In my programs i am using tie function.

Here is the code.

$db = tie(%FILE_NAMES, 'SDBM_File', $tName, O_RDWR|O_CREAT, 0666)

Here i need to put one lock to avoid dead lock situation.

Thanks,
gadege

Where have you looked?

The Perl FAQ that comes with every Perl distribution contains
'How can I lock a file?' I suggest you start there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.