473,669 Members | 2,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

berkeley db

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

Nov 14 '05 #1
2 1942
Wojtek <ad***********@ o2.pl> 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.progr ammer or a
system-specific newsgroup.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"No, Maggie, not Aztec, Olmec! Ol-mec!"
- Lisa Simpson
Nov 14 '05 #2
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 bo****@sleepyca t.com
Sleepycat Software Inc. keithbosticim (ymsgid)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com

Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1575
by: Harald Massa | last post by:
I found Berkeley DB XML while searching for XML-Databases. I want to use it from PYHTON - and I found examples.py in the distribution. But... examples.py tries to import from dbxml import * from bsddb3.db import * I do not have dbxml or bsddb3 on my computer ... using Python 2.3, I
1
2105
by: Dan Olsen | last post by:
I am trying to install and use Berkeley XML DB with Python. However, I keep getting errors. The weblog at Sleepy Cat said to build Python with the latest version of Berkeley DB. I can't get it to build with it. Does anyone have any good directions on how to get Berkeley XML DB running with Python? I have followed Sleepy Cat's installation instructions but have been unable to get it to work thus far. Dan
2
2559
by: Oliver Peek | last post by:
Hi all, Probably my fault, I'm opening a Berkeley DB file, iterating through and deleting keys, well making an attempt. I get this error when I try to delete. ---error Traceback (most recent call last): File "./db.py", line 41, in ?
4
1489
by: janeaustine50 | last post by:
It doesn't seem like the python 2.4(and the recent 2.4.1) support berkeley db 4.3. (4.3 fixes some deadlock bugs I occasionally encounter using 4.2.) bsddb3(at pybsddb.sf.net) already supports 4.3 since last December(but doesn't explicitly support win32 -- see the assert statement in setup.py). I thought the bsddb3 project were merged into the python project. Hasn't it?
0
1261
by: Martin | last post by:
Hi Anyone have a code example which shows how to access a Berkeley Database from C#? Thanks. Martin
0
2036
by: gemini_kj | last post by:
hi, i am begineer in Berkeley DB , i need some examples which can ilustrate how to store objects in berkely DB. if anybody has plz send on the forum or either mail me at kunal.jethwa@gmail.com thx in advance regards kunal :confused:
2
3061
by: Dan M | last post by:
I'm working on a script that will interface with sendmail on my FreeBSD box. I'm trying to read my access.db file (yes, it's for a quick and dirty SMTP-after-POP application). I'm trying: import bsddb bsddb.hashopen("access.db") but I get: bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- access.db: unexpected file type or format')
0
1168
by: Pascal Schmitt | last post by:
Hello! Is there an existant .NET Wrapper for Sleepycat Berkeley DB XML 2.0 (see http://sleepycat.com/products/xml.shtml)? It seems to be the XML-DB of my dreams, but has only a Java-Wrapper (could this be converted to J#?) If not, could you suggest another (cheap or free) Native-XML-DB (with XQuery-Support) for .NET?
3
1725
by: HerbAsher | last post by:
Hi! I have some questions. I'm evaluating berkeley db as a embeddable storage engine for a project I'm working on. My questions: 1. Now that Berkeley DB is part of Oracle, is it still being maintained? Is it free? 2. Are there good python libraries for bdb available, that are being
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8894
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8587
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.