SYNOPSIS
#include <signal.h>
int sigvec(int sig, struct sigvec *vec, struct sigvec *ovec);
DESCRIPTION
The
sig specifies the signal and can be assigned any signal except SIGKILL or SIGSTOP.
If vec is not NULL, it points to a structure that
specifies the new action associated with the specified signal. If
vec is NULL, the
If
The sigvec structure contains the following members:
(*sv_handler)() ; /* signal handler */ int sv_mask; /* signal mask to apply */ int sv_flags; /* see signal options */
sv_handler specifies the disposition of the signal, and may take either a pointer to a signal handler function, or may take the value SIG_DFL or SIG_IGN.
sv_mask specifies the set of signals to be blocked while the signal handler is active. On entry to the signal handler, that set of signals is added to the set of signals already being blocked when the signal is delivered. SIGSTOP and SIGKILL cannot be blocked (the system silently enforces this restriction.
The following bits may be set in sv_flags:
- SV_ONSTACK
-
Signal is to be delivered using signal stack.
- SV_RESETHAND
-
If set and the signal is caught, the disposition of the signal is reset to SIG_DFL and the signal is not blocked on entry to the signal handler.
- SV_INTERRUPT
-
If set and the signal is caught, a system call that is interrupted by the execution of this signal's handler returns -1 with errno set to EINTR. If this flag is not set, some system calls are transparently restarted when signals are delivered.
After a
The
PARAMETERS
- sig
-
Is the signal number.
- vec
-
Points to a structure that specifies a new signal action.
- ovec
-
Is a return pointer to a structure for holding the old signal action.
RETURN VALUES
If successful,
- EFAULT
-
Either vec or ovec is an invalid pointer.
- EINVAL
-
sig is not a valid signal number. An attempt was made to ignore or supply a handler for SIGKILL or SIGSTOP.
CONFORMANCE
BSD 4.4, with exceptions.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
The SV_ONSTACK bit is silently ignored by the NuTCRACKER Platform.
Most system calls are not automatically restartable.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutForkExecl() ,_NutForkExecle() ,_NutForkExeclp() ,_NutForkExeclpe() ,_NutForkExecv() ,_NutForkExecve() ,_NutForkExecvp() ,_NutForkExecvpe() ,execl() ,execle() ,execlp() ,execlpe() ,execv() ,execve() ,execvpe() ,execvpe() ,exit() ,fork() ,kill() ,pause() ,pthread_sigmask() ,sigdelset() ,sigemptyset() ,sigfillset() ,sigismember() ,signal() ,sigprocmask() ,sigsuspend() ,vfork() ,wait() ,waitpid()
PTC MKS Toolkit 10.5 Documentation Build 40.