aboutsummaryrefslogtreecommitdiffstats
path: root/man2/sigaltstack.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/sigaltstack.2')
-rw-r--r--man2/sigaltstack.237
1 files changed, 26 insertions, 11 deletions
diff --git a/man2/sigaltstack.2 b/man2/sigaltstack.2
index f93c815560..4f727b6ae6 100644
--- a/man2/sigaltstack.2
+++ b/man2/sigaltstack.2
@@ -27,7 +27,8 @@ sigaltstack \- set and/or get signal stack context
.sp
.BI "int sigaltstack(const stack_t *" ss ", stack_t *" oss );
.SH DESCRIPTION
-\fBsigaltstack\fP() allows a process to define a new alternate
+.BR sigaltstack ()
+allows a process 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
@@ -43,11 +44,14 @@ Allocate an area of memory to be used for the alternate
signal stack.
.TP
2.
-Use \fBsigaltstack\fP() to inform the system of the existence and
+Use
+.BR sigaltstack ()
+to inform the system of the existence and
location of the alternate signal stack.
.TP
3.
-When establishing a signal handler using \fBsigaction\fP(2),
+When establishing a signal handler using
+.BR sigaction (2),
inform the system that the signal handler should be executed
on the alternate signal stack by
specifying the \fBSA_ONSTACK\fP flag.
@@ -90,7 +94,8 @@ in \fIss\fP are ignored.
If \fIoss\fP is not NULL, then it is used to return information about
the alternate signal stack which was in effect prior to the
-call to \fBsigaltstack\fP().
+call to
+.BR sigaltstack ().
The \fIoss.ss_sp\fP and \fIoss.ss_size\fP fields return the starting
address and size of that stack.
The \fIoss.ss_flags\fP may return either of the following values:
@@ -104,7 +109,8 @@ currently executing on it.)
.B SS_DISABLE
The alternate signal stack is currently disabled.
.SH "RETURN VALUE"
-\fBsigaltstack\fP() returns 0 on success, or \-1 on failure with
+.BR sigaltstack ()
+returns 0 on success, or \-1 on failure with
\fIerrno\fP set to indicate the error.
.SH ERRORS
.TP
@@ -133,7 +139,8 @@ normal process stack is exhausted: in this case, a signal handler for
cannot be invoked on the process stack; if we wish to handle it,
we must use an alternate signal stack.
-The following code segment demonstrates the use of \fBsigaltstack\fP():
+The following code segment demonstrates the use of
+.BR sigaltstack ():
.RS
.nf
@@ -161,7 +168,8 @@ on an alternate signal stack.
.P
On most hardware architectures supported by Linux, stacks grow
downwards.
-\fBsigaltstack\fP() automatically takes account
+.BR sigaltstack ()
+automatically takes account
of the direction of stack growth.
.P
Functions called from a signal handler executing on an alternate
@@ -173,12 +181,19 @@ automatically extend the alternate signal stack.
Exceeding the allocated size of the alternate signal stack will
lead to unpredictable results.
.P
-A successful call to \fBexecve\fP(2) removes any existing alternate
+A successful call to
+.BR execve (2)
+removes any existing alternate
signal stack.
.P
-\fBsigaltstack\fP() supersedes the older \fBsigstack\fP() call.
-For backwards compatibility, glibc also provides \fBsigstack\fP().
-All new applications should be written using \fBsigaltstack\fP().
+.BR sigaltstack ()
+supersedes the older
+.BR sigstack ()
+call.
+For backwards compatibility, glibc also provides
+.BR sigstack ().
+All new applications should be written using
+.BR sigaltstack ().
.SH HISTORY
4.2BSD had a \fIsigstack\fP() system call.
It used a slightly