|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: Re: Databases... (DB & CDB in particular)
From: Richard Huxton (dev
archonet.com)Date: Fri Dec 08 2000 - 10:50:38 CST
- Next message: Liviu Daia: "Re: body checks against harmful code..."
- Previous message: Matthias Andree: "Postfix Wish List Online"
- In reply to: Michael Tokarev: "Re: Databases... (DB & CDB in particular)"
- Next in thread: Michael Tokarev: "Re: Databases... (DB & CDB in particular)"
- Reply: Richard Huxton: "Re: Databases... (DB & CDB in particular)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
----- Original Message -----
From: "Michael Tokarev" <mjt
tls.msk.ru>
> Wietse Venema wrote:
> >
> > Michael Ju. Tokarev:
> []
> > > it. So I now have a solution, -- that is:
> > >
> > > open(file.cdb)
> > > lock it (*)
> > > open(it again)
> > > compare fstats() on both
> > > close second one if ok (bail out or repeat if not)
> >
> > And at that point you lose the exclusive lock. Welcome to the world
> > of POSIX fcntl() locking, which is the only locking that Postfix
> > can use on System-V systems such as Solaris, HP-UX and others.
>
> Doh!!! Never heard about this behavour... Just tested this
> on Solaris and Linux, -- yes, if while holding a lock I
> open+close the same file in the same process (using another,
> different diledescriptor!), lock will be lost! Very
> surprizingly... And seemed to be a bit strange at a first
> view, -- I need to read POSIX specs about this carefully...
> Thanks for a point.
Slightly OT: but Stevens' Advanced Programming in the UNIX Environment
(Addison Wesley) is a good investment - 50 quid in the UK and I hardly ever
use it, but it pays for itself the first time you do.
He's also got a network programming book.
- Richard Huxton
- Next message: Liviu Daia: "Re: body checks against harmful code..."
- Previous message: Matthias Andree: "Postfix Wish List Online"
- In reply to: Michael Tokarev: "Re: Databases... (DB & CDB in particular)"
- Next in thread: Michael Tokarev: "Re: Databases... (DB & CDB in particular)"
- Reply: Richard Huxton: "Re: Databases... (DB & CDB in particular)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]