berkeley db

W

Wojtek

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
 
J

Joona I Palaste

Wojtek said:
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.
 
B

bostic

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 (e-mail address removed)
Sleepycat Software Inc. keithbosticim (ymsgid)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top