Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: locking dbm files Keywords: dbmopen, dbmclose, flock Message-ID: <1991Mar14.205242.23220@convex.com> Date: 14 Mar 91 20:52:42 GMT References: <21090@shlump.nac.dec.com> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 12 Nntp-Posting-Host: pixel.convex.com From the keyboard of evans@decvax.DEC.COM: :I am using the dbm (ndbm too) facilities provided by perl. It would appear :that the file(s) opened by dbmopen are not locked and therefore data can be :lost if more then one process attempts to modify the database at the same :time. It would also appear that this may be caused by the library functions :on the host, not perl itself. This is certainly true. dbm doesn't do locking. To do record locking would be hard. You could easily enough protect it with file locking though, but you should do this in your own code. --tom