BACK
Manpage of CLUSTER_EVENTS_REGISTER_SIGNAL
CLUSTER_EVENTS_REGISTER_SIGNAL
Section: OpenSSI Cluster Prog Manual (2ssi)
Updated: 5 May 2004
NAME
cluster_events_register_signal -- Allows applications to register any signal to recieve cluster events
SYNOPSIS
#include <sys/cluster.h>
int cluster_events_register_signal(int desired_fd, int signum)
cc [flag ...] file -lcluster [library ...]
DESCRIPTION
cluster_events_register_signal is a libcluster API that helps applications to register any signal to receive cluster events (like node up, down, .. etc). cluster_events_register_signal uses fasync mechanism on /proc/cluster/events to send cluster change signals only to processes that want them.
cluster_events_register_signal opens /proc/cluster/events and sets a signal to be delivered when cluster events occur. Cluster events must be read using interfaces such as cluster_transition(3ssi). The file descriptor returned by the function cannot be used for I/O or select()/poll() at this time. The file-descriptor is marked close-on-exec. To stop receiving signals, close the file descriptor.
ARGUMENTS
- desired_fd
-
may be -1, indicating the caller does not care what descriptor is used for the file; otherwise, desired_fd will be used as the descriptor for file on /proc/cluster/events.
- signum
-
signal number that is used to recieve cluster events. When any cluster event occurs signal signum is sent to the process.
RETURN VALUE
- cluster_events_register_signal returns the file descriptor that is used to recieve cluster event signals on, or -1 if an error occurred (in which case, errno is set appropriately).
-
BUGS
- Processes that use this interface cannot migrate at this time.
-
REFERENCES
proc-ssi(1ssi)
cluster_transition(3ssi)
cluster_detailedtransition(3ssi)
This document was created by man2html,
using the manual pages.
Time: 21:59:39 GMT, May 19, 2004