sigaltstack.2: Note buggy addition of ss.ss_flags==SS_ONSTACK

Note buggy addition of ss.ss_flags==SS_ONSTACK as a synonym
for ss_flags==0. No other implemenation does this, AFAIK.
And it was not needed :-(.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-05-22 20:27:53 +02:00
parent 1614a08551
commit 27009c9956
1 changed files with 16 additions and 0 deletions

View File

@ -259,6 +259,22 @@ if (sigaltstack(&ss, NULL) == \-1)
/* Handle error */;
.fi
.in
.SH BUGS
In the lead up to the development of the Linux 2.4 kernel,
.\" Linux 2.3.40
someone got confused and allowed the kernel to accept
.B SS_ONSTACK
in
.IR ss.ss_flags ,
which results behavior that is the same as when
.I ss_flags
is 0.
On other implementations, and according to POSIX.1,
.B SS_ONSTACK
appears only as a reported flag in
.IR old_ss.ss_flags .
There is no need ever to specify this flag in
.IR ss.ss_flags .
.SH SEE ALSO
.BR execve (2),
.BR setrlimit (2),