User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Perl section within the Software Development category of DaniWeb, a massive community of 423,575 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,476 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Perl advertiser: Programming Forums

How to lock SDBM file when that file is writing by multiple programs at the same time

Join Date: Oct 2007
Posts: 3
Reputation: gadege is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gadege gadege is offline Offline
Newbie Poster

How to lock SDBM file when that file is writing by multiple programs at the same time

  #1  
Apr 17th, 2008
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
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 7:13 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC