fix mdoc reference
This commit is contained in:
parent
41d55197b4
commit
807b1efe4c
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: sigvec.3,v 1.13 1998/02/05 18:45:46 perry Exp $
|
||||
.\" $NetBSD: sigvec.3,v 1.14 1998/04/28 18:52:08 fair Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -45,9 +45,9 @@
|
||||
.Fd #include <signal.h>
|
||||
.Bd -literal
|
||||
struct sigvec {
|
||||
void (*sv_handler)();
|
||||
int sv_mask;
|
||||
int sv_flags;
|
||||
void (*sv_handler)();
|
||||
int sv_mask;
|
||||
int sv_flags;
|
||||
};
|
||||
.Ed
|
||||
.Ft int
|
||||
@ -60,10 +60,11 @@ This interface is made obsolete by
|
||||
.Pp
|
||||
The system defines a set of signals that may be delivered to a process.
|
||||
Signal delivery resembles the occurrence of a hardware interrupt:
|
||||
the signal is blocked from further occurrence, the current process
|
||||
context is saved, and a new one is built. A process may specify a
|
||||
the signal is blocked from further occurrence, the current process
|
||||
context is saved, and a new one is built.
|
||||
A process may specify a
|
||||
.Em handler
|
||||
to which a signal is delivered, or specify that a signal is to be
|
||||
to which a signal is delivered, or specify that a signal is to be
|
||||
.Em ignored .
|
||||
A process may also specify that a default action is to be taken
|
||||
by the system when a signal occurs.
|
||||
@ -74,20 +75,22 @@ in which case its delivery is postponed until it is
|
||||
The action to be taken on delivery is determined at the time
|
||||
of delivery.
|
||||
Normally, signal handlers execute on the current stack
|
||||
of the process. This may be changed, on a per-handler basis,
|
||||
so that signals are taken on a special
|
||||
of the process.
|
||||
This may be changed, on a per-handler basis, so that signals are
|
||||
taken on a special
|
||||
.Em "signal stack" .
|
||||
.Pp
|
||||
Signal routines execute with the signal that caused their
|
||||
invocation
|
||||
.Em blocked ,
|
||||
but other signals may yet occur.
|
||||
A global
|
||||
A global
|
||||
.Em "signal mask"
|
||||
defines the set of signals currently blocked from delivery
|
||||
to a process. The signal mask for a process is initialized
|
||||
from that of its parent (normally 0). It
|
||||
may be changed with a
|
||||
to a process.
|
||||
The signal mask for a process is initialized from that of its parent
|
||||
(normally 0).
|
||||
It may be changed with a
|
||||
.Xr sigblock 3
|
||||
or
|
||||
.Xr sigsetmask 3
|
||||
@ -95,16 +98,17 @@ call, or when a signal is delivered to the process.
|
||||
.Pp
|
||||
When a signal
|
||||
condition arises for a process, the signal is added to a set of
|
||||
signals pending for the process. If the signal is not currently
|
||||
signals pending for the process.
|
||||
If the signal is not currently
|
||||
.Em blocked
|
||||
by the process then it is delivered to the process.
|
||||
When a caught signal
|
||||
is delivered, the current state of the process is saved,
|
||||
a new signal mask is calculated (as described below),
|
||||
and the signal handler is invoked. The call to the handler
|
||||
is arranged so that if the signal handling routine returns
|
||||
normally the process will resume execution in the context
|
||||
from before the signal's delivery.
|
||||
a new signal mask is calculated (as described below),
|
||||
and the signal handler is invoked.
|
||||
The call to the handler is arranged so that if the signal handling
|
||||
routine returns normally the process will resume execution in the
|
||||
context from before the signal's delivery.
|
||||
If the process wishes to resume in a different context, then it
|
||||
must arrange to restore the previous context itself.
|
||||
.Pp
|
||||
@ -116,11 +120,12 @@ or
|
||||
.Xr sigsetmask 3
|
||||
call is made).
|
||||
This mask is formed by taking the union of the current signal mask,
|
||||
the signal to be delivered, and
|
||||
the signal to be delivered, and
|
||||
the signal mask associated with the handler to be invoked.
|
||||
.Pp
|
||||
.Fn Sigvec
|
||||
assigns a handler for a specific signal. If
|
||||
assigns a handler for a specific signal.
|
||||
If
|
||||
.Fa vec
|
||||
is non-zero, it
|
||||
specifies an action
|
||||
@ -136,7 +141,7 @@ the system will deliver the signal to the process on a
|
||||
.Em "signal stack" ,
|
||||
specified with
|
||||
.Xr sigaltstack 2 .
|
||||
If
|
||||
If
|
||||
.Fa ovec
|
||||
is non-zero, the previous handling information for the signal
|
||||
is returned to the user.
|
||||
@ -216,10 +221,10 @@ or
|
||||
all signals, the signal mask, the signal stack,
|
||||
and the interrupt/restart flags are inherited by the child.
|
||||
.Pp
|
||||
.Xr Execve 2
|
||||
reinstates the default
|
||||
action for all signals which were caught and
|
||||
resets all signals to be caught on the user stack.
|
||||
The
|
||||
.Xr execve 2
|
||||
system call reinstates the default action for all signals which
|
||||
were caught and resets all signals to be caught on the user stack.
|
||||
Ignored signals remain ignored;
|
||||
the signal mask remains the same;
|
||||
signals that interrupt pending system calls continue to do so.
|
||||
@ -270,7 +275,7 @@ is possible on a descriptor (see
|
||||
.It Dv SIGUSR2 No " terminate process" " user-defined signal 2"
|
||||
.El
|
||||
.Sh NOTES
|
||||
The mask specified in
|
||||
The mask specified in
|
||||
.Fa vec
|
||||
is not allowed to block
|
||||
.Dv SIGKILL
|
||||
@ -284,8 +289,8 @@ flag is not available in
|
||||
.Bx 4.2 ,
|
||||
hence it should not be used if backward compatibility is needed.
|
||||
.Sh RETURN VALUES
|
||||
A 0 value indicated that the call succeeded. A \-1 return value
|
||||
indicates an error occurred and
|
||||
A 0 value indicated that the call succeeded.
|
||||
A \-1 return value indicates an error occurred and
|
||||
.Va errno
|
||||
is set to indicated the reason.
|
||||
.Sh EXAMPLE
|
||||
@ -300,7 +305,7 @@ handler(sig, code, scp)
|
||||
Here
|
||||
.Fa sig
|
||||
is the signal number, into which the hardware faults and traps are
|
||||
mapped as defined below.
|
||||
mapped as defined below.
|
||||
.Fa Code
|
||||
is a parameter that is either a constant
|
||||
or the code provided by the hardware.
|
||||
@ -318,7 +323,7 @@ of the following occurs:
|
||||
.It Bq Er EFAULT
|
||||
Either
|
||||
.Fa vec
|
||||
or
|
||||
or
|
||||
.Fa ovec
|
||||
points to memory that is not a valid part of the process
|
||||
address space.
|
||||
@ -342,7 +347,7 @@ or
|
||||
.Xr setjmp 3 ,
|
||||
.Xr sigblock 3 ,
|
||||
.Xr siginterrupt 3 ,
|
||||
.Xr signal 3,
|
||||
.Xr signal 3 ,
|
||||
.Xr sigpause 3 ,
|
||||
.Xr sigsetmask 3 ,
|
||||
.Xr sigsetops 3 ,
|
||||
|
Loading…
Reference in New Issue
Block a user