DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

DB_ENV->set_isalive

API Ref

#include <db.h>

int DB_ENV->set_isalive(DB_ENV *dbenv, int (*is_alive)(DB_ENV *dbenv, pid_t pid, db_threadid_t tid));


Description: DB_ENV->set_isalive

Declare a function that returns if a thread of control (either a true thread or a process) is still running. The DB_ENV->set_isalive method supports the DB_ENV->failchk method. For more information, see Architecting Data Store and Concurrent Data Store applications, and Architecting Transactional Data Store applications.

The DB_ENV->set_isalive method configures operations performed using the specified DB_ENV handle, not all operations performed on the underlying database environment.

The DB_ENV->set_isalive method may be called at any time during the life of the application.

The DB_ENV->set_isalive method returns a non-zero error value on failure and 0 on success.

Parameters

is_alive
The is_alive parameter is a function which returns non-zero if the thread of control, identified by the pid and tid arguments, is still running. The function takes three arguments:
dbenv
The dbenv parameter is the enclosing database environment handle, allowing application access to the application-private fields of that object.
pid
The pid parameter is a process ID returned by the function specified to the DB_ENV->set_thread_id method.
tid
The tid parameter is a thread ID returned by the function specified to the DB_ENV->set_thread_id method.

Errors

The DB_ENV->set_isalive method may fail and return one of the following non-zero errors:

EINVAL
An invalid flag value or parameter was specified.

Class

DB_ENV

See Also

Database Environments and Related Methods

APIRef

Copyright (c) 1996-2005 Sleepycat Software, Inc. - All rights reserved.