Berkeley DB: Db::fd
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++

### Db::fd |

`

###

    #include <db_cxx.h>

    int
    Db::fd(int *fdp);

### Description: Db::fd

The Db::fd method provides access to a file descriptor representative of the underlying database. A file descriptor referring to the same file will be returned to all processes that call Db::open with the same file parameter.

This file descriptor may be safely used as a parameter to the fcntl(2) and flock(2) locking functions.

The Db::fd method only supports a coarse-grained form of locking. Applications should instead use the Berkeley DB lock manager where possible.

The Db::fd method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

fdp
  The fdp parameter references memory into which the current file descriptor is copied.

### Class

Db

### See Also

Databases and Related Methods`

Copyright (c) 1996,2007 Oracle. All rights reserved.