Re: Documenting sigaltstack SS_AUTODISRM

From: Stas Sergeev
Date: Mon Oct 30 2017 - 07:43:30 EST


30.10.2017 13:50, Michael Kerrisk (man-pages) ÐÐÑÐÑ:
I see what you mean. The point is back then that SS_ONSTACK was
the only flag that could (on Linux) be specified in ss.ss_flags,
so that "SS_ONSTACK | SOMETHING_FLAG" was a nonexistent case.
These days, it's possible to specify the new SS_AUTODISARM
flag in ss.ss_flags, which I think is why you are doubtful
about the new page text. How about this, as a tightened-up
version:

BUGS
In Linux 2.2 and earlier, the only flag that could be specified in
ss.sa_flags was SS_DISABLE. In the lead up to the release of the
Linux 2.4 kernel, a change was made to allow sigaltstack() to
allow ss.ss_flags==SS_ONSTACK with the same meaning as
ss.ss_flags==0 (i.e., the inclusion of SS_ONSTACK in ss.ss_flags
is a no-op). On other implementations, and according to POSIX.1,
SS_ONSTACK appears only as a reported flag in old_ss.ss_flags. On
Linux, there is no need ever to specify SS_ONSTACK in ss.ss_flags,
and indeed doing so should be avoided on portability grounds: varâ
ious other systems give an error if SS_ONSTACK is specified in
ss.ss_flags.

And after all these amendments it seems to
no longer belong to BUGS section but to NOTES.