SCCS-vsn: lib/libc/sys/sigaltstack.2 8.2
.\"
.\" %sccs.include.redist.man%
.\"
.\"
.\" %sccs.include.redist.man%
.\"
-.\" @(#)sigaltstack.2 8.1 (Berkeley) %G%
+.\" @(#)sigaltstack.2 8.2 (Berkeley) %G%
.\"
.Dd
.Dt SIGALTSTACK 2
.\"
.Dd
.Dt SIGALTSTACK 2
.Fd #include <signal.h>
.Bd -literal
struct sigaltstack {
.Fd #include <signal.h>
.Bd -literal
struct sigaltstack {
long ss_size;
int ss_flags;
};
long ss_size;
int ss_flags;
};
.Dv SA_DISABLE
is set in
.Fa ss_flags ,
.Dv SA_DISABLE
is set in
.Fa ss_flags ,
and
.Fa ss_size
are ignored and the signal stack will be disabled.
and
.Fa ss_size
are ignored and the signal stack will be disabled.
the usual case when allocating an alternate stack area.
The following code fragment is typically used to allocate an alternate stack.
.Bd -literal -offset indent
the usual case when allocating an alternate stack area.
The following code fragment is typically used to allocate an alternate stack.
.Bd -literal -offset indent
-if ((sigstk.ss_sp = malloc(SIGSTKSZ)) == NULL)
+if ((sigstk.ss_base = malloc(SIGSTKSZ)) == NULL)
/* error return */
sigstk.ss_size = SIGSTKSZ;
sigstk.ss_flags = 0;
/* error return */
sigstk.ss_size = SIGSTKSZ;
sigstk.ss_flags = 0;