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 374,004 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 2,748 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:
Views: 392 | Replies: 1
Reply
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  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 174
Reputation: trudge is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

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

  #2  
Apr 20th, 2008
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.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Perl Marketplace
Thread Tools Display Modes

Other Threads in the Perl Forum

All times are GMT -4. The time now is 10:21 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC