1SIGVEC(2) System Calls Manual SIGVEC(2)
2
3
4
6 sigvec - software signal facilities
7
9 #include <signal.h>
10
11 struct sigvec {
12 int (*sv_handler)();
13 long sv_mask;
14 int sv_flags;
15 };
16
17 sigvec(sig, vec, ovec)
18 int sig;
19 struct sigvec *vec, *ovec;
20
22 This interface has been made obsolete by: [22msigaction(2).
23
24 The system defines a set of signals that may be delivered to a process.
25 Signal delivery resembles the occurence of a hardware interrupt: the
26 signal is blocked from further occurrence, the current process context
27 is saved, and a new one is built. A process may specify a handler to
28 which a signal is delivered, or specify that a signal is to be blocked
29 or ignored. A process may also specify that a default action is to be
30 taken by the system when a signal occurs. Normally, signal handlers
31 execute on the current stack of the process. This may be changed, on a
32 per-handler basis, so that signals are taken on a special signal stack.
33
34 All signals have the same priority. Signal routines execute with the
35 signal that caused their invocation blocked, but other signals may yet
36 occur. A global signal mask defines the set of signals currently
37 blocked from delivery to a process. The signal mask for a process is
38 initialized from that of its parent (normally 0). It may be changed
39 with a sigblock(2) or sigsetmask(2) call, or when a signal is delivered
40 to the process.
41
42 When a signal condition arises for a process, the signal is added to a
43 set of signals pending for the process. If the signal is not currently
44 blocked by the process then it is delivered to the process. When a
45 signal is delivered, the current state of the process is saved, a new
46 signal mask is calculated (as described below), and the signal handler
47 is invoked. The call to the handler is arranged so that if the signal
48 handling routine returns normally the process will resume execution in
49 the context from before the signal's delivery. If the process wishes
50 to resume in a different context, then it must arrange to restore the
51 previous context itself.
52
53 When a signal is delivered to a process a new signal mask is installed
54 for the duration of the process' signal handler (or until a sigblock or
55 sigsetmask call is made). This mask is formed by taking the current
56 signal mask, adding the signal to be delivered, and or'ing in the sig‐
57 nal mask associated with the handler to be invoked.
58
59 Sigvec assigns a handler for a specific signal. If vec is non-zero, it
60 specifies a handler routine and mask to be used when delivering the
61 specified signal. Further, if the SV_ONSTACK bit is set in sv_flags,
62 the system will deliver the signal to the process on a signal stack,
63 specified with sigstack(2). If ovec is non-zero, the previous handling
64 information for the signal is returned to the user.
65
66 The following is a list of all signals with names as in the include
67 f