Re: Invoking cdbdump from a bash script, hanging

"Gerrit Pape" <[email protected]> Thu, 19 Dec 2002 18:25:59 +0100
Newsgroups gmane.comp.djb.cdb
Message-ID <[email protected]>
On Thu, Dec 19, 2002 at 11:53:15AM -0500, Paul Jarc wrote:
> "Gerrit Pape" <[email protected]> wrote:
> > If you don't change the length of a value, you can edit the value in
> > the binary cdb directly, without recreating the hashes.
> 
> Multi-byte writes may not be atomic (AFAIK), so another requirement is
> that the hash values should be only one byte.  (In this case, they
> are.)

What my program actually does is: copy data.cdb to data.tmp, edit the
binary database data.tmp, and then move data.tmp to data.cdb.  It still
is faster than recreating the cdb, and reliable.

Regards, Gerrit.