SIGSET.3
资源名称:os_source.zip [点击查看]
上传用户:datang2001
上传日期:2007-02-01
资源大小:53269k
文件大小:2k
源码类别:
操作系统开发
开发平台:
C/C++
- .TH SIGSET 3
- .SH NAME
- sigset, sigaddset, sigdelset, sigemptyset, sigfillset, sigismember - manipulate signal sets
- .SH SYNOPSIS
- .ft B
- #include <signal.h>
- .nf
- int sigaddset(sigset_t *fIsetfP, int fIsigfP)
- int sigdelset(sigset_t *fIsetfP, int fIsigfP)
- int sigemptyset(sigset_t *fIsetfP)
- int sigfillset(sigset_t *fIsetfP)
- int sigismember(const sigset_t *fIsetfP, int fIsigfP)
- .fi
- .ft P
- .SH DESCRIPTION
- The system calls that handle signals, such as
- .BR sigaction (2)
- and
- .BR sigprocmask (2)
- use sets of signals to keep a process from being interrupted by those
- signals while executing a signal handler or a critical code segment. These
- signal sets are manipulated by the following functions:
- .TP 5
- .B "int sigaddset(sigset_t *fIsetfP, int fIsigfP)"
- Add signal
- .I sig
- to the signal set referenced by
- .IR set .
- .TP
- .B "int sigdelset(sigset_t *fIsetfP, int fIsigfP)"
- Remove signal
- .I sig
- from the signal set referenced by
- .IR set .
- .TP
- .B "int sigemptyset(sigset_t *fIsetfP)"
- Initialize the signal set referenced by
- .I set
- to an empty set.
- .TP
- .B "int sigfillset(sigset_t *fIsetfP)"
- Initialize the signal set referenced by
- .I set
- to an full set, i.e. all signals are in the set.
- .TP
- .B "int sigismember(const sigset_t *fIsetfP, int fIsigfP)"
- Return
- .B 1
- if the signal
- .I sig
- is present in the set referenced by
- .IR set ,
- .B 0
- otherwise.
- .SH "SEE ALSO"
- .BR sigaction (2),
- .BR sigpending (2),
- .BR sigprocmask (2),
- .BR sigsuspend (2).
- .SH DIAGNOSTICS
- All functions except
- .B sigismember
- return
- .B 0
- on success.
- .B Sigismember
- returns
- .B 0
- or
- .B 1
- on success. They return
- .B -1
- with error code
- .B EINVAL
- for an invalid signal number. (They do not use
- .B EFAULT
- for a bad
- .I set
- address, but will simply cause a segmentation violation.)
- .SH AUTHOR
- Kees J. Bot (kjb@cs.vu.nl)