From e710f10c36483686ca628dcf4c595b41a8407835 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 23 May 2017 15:22:33 +0200 Subject: [PATCH] sigaltstack.2: Note that specifying SS_ONSTACK in ss.ss_falgs decreases portability In the Illumos source (which presumably mirrors its Solaris ancestry), there is this check in the sigaltstack() implementation: if (ss.ss_flags & ~SS_DISABLE) return (set_errno(EINVAL)); And in the FreeBSD source we find similar: if ((ss->ss_flags & ~SS_DISABLE) != 0) return (EINVAL); Signed-off-by: Michael Kerrisk --- man2/sigaltstack.2 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/man2/sigaltstack.2 b/man2/sigaltstack.2 index d3934ffef..ed8681e76 100644 --- a/man2/sigaltstack.2 +++ b/man2/sigaltstack.2 @@ -273,7 +273,14 @@ On other implementations, and according to POSIX.1, 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 . +.IR ss.ss_flags +(and indeed, doing so decreases portability, +since some implementations +.\" See the source code of Illumos and FreeBSD, for example. +give an error if +.B SS_ONSTACK +is specified in +.IR ss.ss_flags ). .SH SEE ALSO .BR execve (2), .BR setrlimit (2),