Debian Codegraph @

docs/api_reference/C/dbfd.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DB-&gt;fd()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10 <link rel="up" href="db.html" title="Chapter 2.  The DB Handle" />
11 <link rel="prev" href="dbexists.html" title="DB-&gt;exists()" />
12 <link rel="next" href="dbget.html" title="DB-&gt;get()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DB-&gt;fd()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="dbexists.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 2. 
26 The DB Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="dbget.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="dbfd"></a>DB-&gt;fd()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB-&gt;fd(DB *db, int *fdp); </pre>
45 <p>
46 The <code class="methodname">DB-&gt;fd()</code> method provides access to a file descriptor
47 representative of the underlying database. A file descriptor
48 referring to the same file will be returned to all processes that call
49 <a class="xref" href="dbopen.html" title="DB-&gt;open()">DB-&gt;open()</a> with the same
50 <span class="bold"><strong>file</strong></span> parameter.
51 </p>
52 <p>
53 This file descriptor may be safely used as a parameter to the
54 <span class="bold"><strong>fcntl</strong></span>(2) and <span class="bold"><strong>flock</strong></span>(2) locking functions.
55 </p>
56 <p>
57 The <code class="methodname">DB-&gt;fd()</code> method only supports a coarse-grained form of locking.
58 Applications should instead use the Berkeley DB lock manager where
59 possible.
60 </p>
61 <p>
62 The <code class="methodname">DB-&gt;fd()</code> <span>
63 <span>
64 method returns a non-zero error value on failure and 0 on success.
65 </span>
66
67 </span>
68 </p>
69 <div class="sect2" lang="en" xml:lang="en">
70 <div class="titlepage">
71 <div>
72 <div>
73 <h3 class="title"><a id="idp49532080"></a>Parameters</h3>
74 </div>
75 </div>
76 </div>
77 <div class="sect3" lang="en" xml:lang="en">
78 <div class="titlepage">
79 <div>
80 <div>
81 <h4 class="title"><a id="idp49531048"></a>fdp</h4>
82 </div>
83 </div>
84 </div>
85 <p>
86 The <span class="bold"><strong>fdp</strong></span> parameter references memory
87 into which the current file descriptor is copied.
88 </p>
89 </div>
90 </div>
91 <div class="sect2" lang="en" xml:lang="en">
92 <div class="titlepage">
93 <div>
94 <div>
95 <h3 class="title"><a id="idp49438928"></a>Class</h3>
96 </div>
97 </div>
98 </div>
99 <p>
100 <a class="link" href="db.html" title="Chapter 2.  The DB Handle">DB</a>
101 </p>
102 </div>
103 <div class="sect2" lang="en" xml:lang="en">
104 <div class="titlepage">
105 <div>
106 <div>
107 <h3 class="title"><a id="idp49520320"></a>See Also</h3>
108 </div>
109 </div>
110 </div>
111 <p>
112 <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a>
113 </p>
114 </div>
115 </div>
116 <div class="navfooter">
117 <hr />
118 <table width="100%" summary="Navigation footer">
119 <tr>
120 <td width="40%" align="left"><a accesskey="p" href="dbexists.html">Prev</a> </td>
121 <td width="20%" align="center">
122 <a accesskey="u" href="db.html">Up</a>
123 </td>
124 <td width="40%" align="right"> <a accesskey="n" href="dbget.html">Next</a></td>
125 </tr>
126 <tr>
127 <td width="40%" align="left" valign="top">DB-&gt;exists() </td>
128 <td width="20%" align="center">
129 <a accesskey="h" href="index.html">Home</a>
130 </td>
131 <td width="40%" align="right" valign="top"> DB-&gt;get()</td>
132 </tr>
133 </table>
134 </div>
135 </body>
136 </html>