berkeley db

Discussion in 'C Programming' started by Wojtek, Dec 17, 2004.

  1. Wojtek

    Wojtek Guest

    Hi I'm writing multiprocess server which has to gather information from
    the clients and store it to berkeley db. The problem is that BerkeleyDB
    adds entries to the base only if they are added from the same proces
    within was created all is ok. But when I fork() it the code runs without
    any error, but DB adds nothnig :(. How can I solve this problem.

    Thank you in advance


    --
    Wojtek W.
    GG: 2182255
    Linux-User #341555
     
    Wojtek, Dec 17, 2004
    #1
    1. Advertising

  2. Wojtek <> scribbled the following:
    > Hi I'm writing multiprocess server which has to gather information from
    > the clients and store it to berkeley db. The problem is that BerkeleyDB
    > adds entries to the base only if they are added from the same proces
    > within was created all is ok. But when I fork() it the code runs without
    > any error, but DB adds nothnig :(. How can I solve this problem.


    This has nothing to do with C. Please ask in comp.unix.programmer or a
    system-specific newsgroup.

    --
    /-- Joona Palaste () ------------- Finland --------\
    \-------------------------------------------------------- rules! --------/
    "No, Maggie, not Aztec, Olmec! Ol-mec!"
    - Lisa Simpson
     
    Joona I Palaste, Dec 17, 2004
    #2
    1. Advertising

  3. Wojtek

    Guest

    Berkeley DB handles cannot be shared across a fork, each forked child
    should open the DB database environment separately. (You'll almost
    certainly need a database environment in the case of a multi-process
    application.)

    Regards,
    --keith

    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Keith Bostic
    Sleepycat Software Inc. keithbosticim (ymsgid)
    118 Tower Rd. +1-781-259-3139
    Lincoln, MA 01773 http://www.sleepycat.com
     
    , Dec 17, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gregory Burd

    [ANNOUNCE] Berkeley DB XML 2.0.7

    Gregory Burd, Dec 14, 2004, in forum: XML
    Replies:
    0
    Views:
    402
    Gregory Burd
    Dec 14, 2004
  2. Gregory Burd

    [ANNOUNCE] Berkeley DB XML 2.1.7

    Gregory Burd, May 3, 2005, in forum: XML
    Replies:
    0
    Views:
    489
    Gregory Burd
    May 3, 2005
  3. Harald Massa
    Replies:
    0
    Views:
    358
    Harald Massa
    Sep 16, 2003
  4. Dan Olsen

    Python and Berkeley XML DB

    Dan Olsen, Jul 13, 2004, in forum: Python
    Replies:
    1
    Views:
    618
    vincent wehren
    Jul 13, 2004
  5. Oliver Peek

    berkeley db delete problem?

    Oliver Peek, Aug 9, 2004, in forum: Python
    Replies:
    2
    Views:
    2,148
    wes weston
    Aug 9, 2004
Loading...

Share This Page