Deleted Added
full compact
sigvec.2 (119893) sigvec.2 (131504)
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)sigvec.2 8.2 (Berkeley) 4/19/94
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)sigvec.2 8.2 (Berkeley) 4/19/94
33.\" $FreeBSD: head/lib/libc/compat-43/sigvec.2 119893 2003-09-08 19:57:22Z ru $
33.\" $FreeBSD: head/lib/libc/compat-43/sigvec.2 131504 2004-07-02 23:52:20Z ru $
34.\"
35.Dd April 19, 1994
36.Dt SIGVEC 2
37.Os
38.Sh NAME
39.Nm sigvec
40.Nd software signal facilities
41.Sh LIBRARY

--- 13 unchanged lines hidden (view full) ---

55.Bf -symbolic
56This interface is made obsolete by
57.Xr sigaction 2 .
58.Ef
59.Pp
60The system defines a set of signals that may be delivered to a process.
61Signal delivery resembles the occurrence of a hardware interrupt:
62the signal is blocked from further occurrence, the current process
34.\"
35.Dd April 19, 1994
36.Dt SIGVEC 2
37.Os
38.Sh NAME
39.Nm sigvec
40.Nd software signal facilities
41.Sh LIBRARY

--- 13 unchanged lines hidden (view full) ---

55.Bf -symbolic
56This interface is made obsolete by
57.Xr sigaction 2 .
58.Ef
59.Pp
60The system defines a set of signals that may be delivered to a process.
61Signal delivery resembles the occurrence of a hardware interrupt:
62the signal is blocked from further occurrence, the current process
63context is saved, and a new one is built. A process may specify a
63context is saved, and a new one is built.
64A process may specify a
64.Em handler
65to which a signal is delivered, or specify that a signal is to be
66.Em blocked
67or
68.Em ignored .
69A process may also specify that a default action is to be taken
70by the system when a signal occurs.
71Normally, signal handlers execute on the current stack
65.Em handler
66to which a signal is delivered, or specify that a signal is to be
67.Em blocked
68or
69.Em ignored .
70A process may also specify that a default action is to be taken
71by the system when a signal occurs.
72Normally, signal handlers execute on the current stack
72of the process. This may be changed, on a per-handler basis,
73of the process.
74This may be changed, on a per-handler basis,
73so that signals are taken on a special
74.Em "signal stack" .
75.Pp
76All signals have the same
77.Em priority .
78Signal routines execute with the signal that caused their
79invocation
80.Em blocked ,
81but other signals may yet occur.
82A global
83.Em "signal mask"
84defines the set of signals currently blocked from delivery
75so that signals are taken on a special
76.Em "signal stack" .
77.Pp
78All signals have the same
79.Em priority .
80Signal routines execute with the signal that caused their
81invocation
82.Em blocked ,
83but other signals may yet occur.
84A global
85.Em "signal mask"
86defines the set of signals currently blocked from delivery
85to a process. The signal mask for a process is initialized
86from that of its parent (normally 0). It
87to a process.
88The signal mask for a process is initialized
89from that of its parent (normally 0).
90It
87may be changed with a
88.Xr sigblock 2
89or
90.Xr sigsetmask 2
91call, or when a signal is delivered to the process.
92.Pp
93When a signal
94condition arises for a process, the signal is added to a set of
91may be changed with a
92.Xr sigblock 2
93or
94.Xr sigsetmask 2
95call, or when a signal is delivered to the process.
96.Pp
97When a signal
98condition arises for a process, the signal is added to a set of
95signals pending for the process. If the signal is not currently
99signals pending for the process.
100If the signal is not currently
96.Em blocked
101.Em blocked
97by the process then it is delivered to the process. When a signal
102by the process then it is delivered to the process.
103When a signal
98is delivered, the current state of the process is saved,
99a new signal mask is calculated (as described below),
104is delivered, the current state of the process is saved,
105a new signal mask is calculated (as described below),
100and the signal handler is invoked. The call to the handler
106and the signal handler is invoked.
107The call to the handler
101is arranged so that if the signal handling routine returns
102normally the process will resume execution in the context
103from before the signal's delivery.
104If the process wishes to resume in a different context, then it
105must arrange to restore the previous context itself.
106.Pp
107When a signal is delivered to a process a new signal mask is
108installed for the duration of the process' signal handler

--- 5 unchanged lines hidden (view full) ---

114This mask is formed by taking the current signal mask,
115adding the signal to be delivered, and
116.Em or Ns 'ing
117in the signal mask associated with the handler to be invoked.
118.Pp
119The
120.Fn sigvec
121function
108is arranged so that if the signal handling routine returns
109normally the process will resume execution in the context
110from before the signal's delivery.
111If the process wishes to resume in a different context, then it
112must arrange to restore the previous context itself.
113.Pp
114When a signal is delivered to a process a new signal mask is
115installed for the duration of the process' signal handler

--- 5 unchanged lines hidden (view full) ---

121This mask is formed by taking the current signal mask,
122adding the signal to be delivered, and
123.Em or Ns 'ing
124in the signal mask associated with the handler to be invoked.
125.Pp
126The
127.Fn sigvec
128function
122assigns a handler for a specific signal. If
129assigns a handler for a specific signal.
130If
123.Fa vec
124is non-zero, it
125specifies a handler routine and mask
126to be used when delivering the specified signal.
127Further, if the
128.Dv SV_ONSTACK
129bit is set in
130.Fa sv_flags ,

--- 208 unchanged lines hidden ---
131.Fa vec
132is non-zero, it
133specifies a handler routine and mask
134to be used when delivering the specified signal.
135Further, if the
136.Dv SV_ONSTACK
137bit is set in
138.Fa sv_flags ,

--- 208 unchanged lines hidden ---