Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > media > main-release > by-pkgid > a4c98df40e78f6c892308fd6841f950a > files > 896

lib64db4.2-devel-4.2.52-11mdv2007.0.x86_64.rpm

<!--$Id: notes.so,v 10.25 2003/10/18 19:15:58 bostic Exp $-->
<!--Copyright 1997-2003 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Windows notes</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for Windows systems</dl></h3></td>
<td align=right><a href="../build_win/test.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_win/faq.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p>
<h3 align=center>Windows notes</h3>
<ol>
<p><li>Various Berkeley DB methods take a <b>mode</b> argument, which is intended
to specify the underlying file permissions for created files.  Berkeley DB
currently ignores this argument on Windows systems.
<p>It would be possible to construct a set of security attributes to pass to
<b>CreateFile</b> that accurately represents the mode.  In the worst
case, this would involve looking up user and all group names, and creating
an entry for each.  Alternatively, we could call the <b>_chmod</b>
(partial emulation) function after file creation, although this leaves us
with an obvious race.</p>
<p>Practically speaking, however, these efforts would be largely meaningless
on a FAT file system, which only has a "readable" and "writable" flag,
applying to all users.</p>
<p><li>On Windows/9X, files opened by multiple processes do not share data
correctly.  For this reason, the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag is implied
for any application that does not specify the <a href="../../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a> flag,
causing the system paging file to be used for sharing data.
<p><li>On all Windows platforms, system paging file memory is freed on last
close.  For this reason, multiple processes sharing a database
environment created using the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag must arrange
for at least one process to always have the environment open, or
alternatively that any process joining the environment be prepared to
re-create it.
<p>If a system memory environment is closed by all processes, subsequent
attempts to open it will return an error.  To successfully open a
transactional environment in this state, recovery must be run by the
next process to open the environment.  For non-transactional
environments, applications must first remove the environment and then
reopen with the <a href="../../api_c/env_open.html#DB_CREATE">DB_CREATE</a> flag.</p>
<p><li>When using the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag, Berkeley DB shared regions are
created without ACLs, which means that the regions are only accessible
to a single user.  If wider sharing is appropriate (for example, both
user applications and Windows/NT service applications need to access
the Berkeley DB regions), the Berkeley DB code will need to be modified to create
the shared regions with the correct ACLs.  Alternatively, by not
specifying the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag, filesystem-backed regions
will be created instead, and the permissions on those files may be
directly specified through the <a href="../../api_c/env_open.html">DB_ENV-&gt;open</a> method.
</ol>
<table width="100%"><tr><td><br></td><td align=right><a href="../build_win/test.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_win/faq.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1><a href="../../sleepycat/legal.html">Copyright (c) 1996-2003</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font>
</body>
</html>