DM_MANAGE(3)

EXPERIMENTAL_FUNC
dm_manage - Manage a file descriptor for events.

SYNOPSIS
#include <karma_dm.h>

KManagedDescriptor dm_manage

(int fd, void *info, flag auto_close, ...)

DESCRIPTION
This routine will manage a file descriptor for activity by registering callback routines. Only one set of callbacks may be registered per file descriptor.

fd  The file descriptor to manage.

info
    The initial value of the arbitrary pointer associated with the managed descriptor. This pointer may be modified by the callback routines.

auto_close
    If TRUE, the descriptor is automatically closed upon a closure event.

... The optional list of parameter event-key event-function pairs must follow. This list must be terminated with the value KARMA_FD_EVENT_END. See <-dm_EVENTS-> for the list of attributes.

RETURN VALUE
A KManagedDescriptor object on success, else NULL.

Multi-threading Level
Unsafe.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/