aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2020-11-12 14:32:26 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-11-12 14:32:26 +0100
commit3b7d89960a52894593c590dafd49feca1feb9ad5 (patch)
tree8f6cf24255af5c16a95804c3f638d1ffd74227b8
parent52e5819c4190c3f248df4b976e0a04cc561289e4 (diff)
downloadman-pages-3b7d89960a52894593c590dafd49feca1feb9ad5.tar.gz
sigaltstack.2: Clarify that the alternate signal stack is per-thread
Clarify that the alternate signal stack is per-thread (rather than process-wide). Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/sigaltstack.220
1 files changed, 10 insertions, 10 deletions
diff --git a/man2/sigaltstack.2 b/man2/sigaltstack.2
index aada8ff693..e30b488f80 100644
--- a/man2/sigaltstack.2
+++ b/man2/sigaltstack.2
@@ -49,7 +49,7 @@ _XOPEN_SOURCE\ >=\ 500
.ad
.SH DESCRIPTION
.BR sigaltstack ()
-allows a process to define a new alternate
+allows a thread to define a new alternate
signal stack and/or retrieve the state of an existing
alternate signal stack.
An alternate signal stack is used during the
@@ -153,15 +153,15 @@ address and size of that stack.
The \fIold_ss.ss_flags\fP may return either of the following values:
.TP
.B SS_ONSTACK
-The process is currently executing on the alternate signal stack.
+The thread is currently executing on the alternate signal stack.
(Note that it is not possible
-to change the alternate signal stack if the process is
+to change the alternate signal stack if the thread is
currently executing on it.)
.TP
.B SS_DISABLE
The alternate signal stack is currently disabled.
.IP
-Alternatively, this value is returned if the process is currently
+Alternatively, this value is returned if the thread is currently
executing on an alternate signal stack that was established using the
.B SS_AUTODISARM
flag.
@@ -208,7 +208,7 @@ was less than
.TP
.B EPERM
An attempt was made to change the alternate signal stack while
-it was active (i.e., the process was already executing
+it was active (i.e., the thread was already executing
on the current alternate signal stack).
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
@@ -232,18 +232,18 @@ flag is a Linux extension.
The most common usage of an alternate signal stack is to handle the
.B SIGSEGV
signal that is generated if the space available for the
-normal process stack is exhausted: in this case, a signal handler for
+standard stack is exhausted: in this case, a signal handler for
.B SIGSEGV
-cannot be invoked on the process stack; if we wish to handle it,
+cannot be invoked on the standard stack; if we wish to handle it,
we must use an alternate signal stack.
.PP
-Establishing an alternate signal stack is useful if a process
+Establishing an alternate signal stack is useful if a thread
expects that it may exhaust its standard stack.
This may occur, for example, because the stack grows so large
that it encounters the upwardly growing heap, or it reaches a
limit established by a call to \fBsetrlimit(RLIMIT_STACK, &rlim)\fP.
If the standard stack is exhausted, the kernel sends
-the process a \fBSIGSEGV\fP signal.
+the thread a \fBSIGSEGV\fP signal.
In these circumstances the only way to catch this signal is
on an alternate signal stack.
.PP
@@ -256,7 +256,7 @@ of the direction of stack growth.
Functions called from a signal handler executing on an alternate
signal stack will also use the alternate signal stack.
(This also applies to any handlers invoked for other signals while
-the process is executing on the alternate signal stack.)
+the thread is executing on the alternate signal stack.)
Unlike the standard stack, the system does not
automatically extend the alternate signal stack.
Exceeding the allocated size of the alternate signal stack will