in reply to BerkeleyDB continue

Hi monks! I was wondering how to continue building a BerkeleyDB. I am building a BerkeleyDB but it keeps getting interrupted! When I start the script again it truncates the file. How can I put in a "continue" flag?

What do you mean by interrupt?

The code you have posted, will continue, it won't truncate -- maybe you need to flush?

Replies are listed 'Best First'.
Re^2: BerkeleyDB continue
by lskatz (Novice) on Jul 15, 2011 at 12:36 UTC
    Interrupted: I have to turn off my computer and it stops the code from running. What is the flush step? It is truncating the database whenever it is initialized with that tie command and writes to the hash. So maybe I need to put a flush statement into an END block?

      What is the flush step?

      Its calling the flush function

      It is truncating the database whenever it is initialized with that tie command and writes to the hash.

      No , berkeleydb won't do that -- if truncation is occurring, its a problem with the code you did not show

      So maybe I need to put a flush statement into an END block?

      Sure, if an END block will get executed after you interrupt it, put it there -- see Signals and END block