SIGFLAG(3-SVR4) RISC/os Reference Manual SIGFLAG(3-SVR4)
NAME
sigflag - simplified signal management
SYNOPSIS
#include <signal.h>
int sigflag(int sig, int flag, int on)
DESCRIPTION
sigflag does an logical OR of the sa_flag in the sigaction
structure associated with signal sig if on is non-zero.If on
is zero, sigflag does a logical AND of the sa_flag with the
inverse of flag.
flags is a logical OR of any of the following values:
SA_ONSTACK
If set and the signal is caught and an alternate signal
stack has been declared with sigaltstack(2), the signal
is delivered to the calling process on that stack.
Otherwise, the signal is delivered on the same as the
main program.
SA_RESETPAND
If set and the signal is caught, the disposition of the
signal is reset to SIG_DFL and the signal will not be
blocked on entry to the signal handler. SIGILL,
SIGTRAP, and SIGPWR cannot be automatically reset when
delivered; the system silently enforces this restric-
tion).
SA_NODEFER
If set and the signal is caught, the signal will not be
automatically blocked by the kernel while it is being
caught.
SA_RESTART
If set and the signal is caught, a system call that is
interrupted by the execution of this signal's handler
is transparently restarted by the system. Otherwise,
that system call returns an EINTR error.
SA_SIGINFO
If cleared and the signal is caught, sig is passed as
the only argument to the signal-catching function. If
set and the signal is caught, pending signals of type
sig are reliably queued to the calling process and two
additional arguments are passed to the signal-catching
function. If the second argument is not equal to NULL,
it points to a siginfo_t structure containing the rea-
son why the signal was generated [see siginfo(5)]; the
third argument points to a ucontext_t structure
Printed 11/19/92 Page 1
SIGFLAG(3-SVR4) RISC/os Reference Manual SIGFLAG(3-SVR4)
containing the receiving process's context when the
signal was delivered [see ucontext(5)].
SA_NOCLDWAIT
If set and sig equals SIGCHLD, the system will not
create zombie processes when children of the calling
process exit. If the calling process subsequently
issues a wait(2), it blocks until all of the calling
process's child processes terminate, and then returns a
value of -1 with errno set to ECHILD.
SA_NOCLDSTOP
If set and sig equals SIGCHLD, sig will not be sent to
the calling process when its child processes stop or
continue.
ERRORS
sigflag will fail with EINVAL if the value of the sig argu-
ment is not a valid signal number or is equal to SIGKILL or
SIGSTOP.
DIAGNOSTICS
On success, sigflag returns 0. On failure, it returns -1
and sets errno to indicate the error.
SEE ALSO
pause(2), sigaltstack(2), signal(2), sigaction(2), wait(2),
ucontext(5), siginfo(5).
Page 2 Printed 11/19/92