Skip to contentSkip to conversation

setcontext was removed in POSIX.1-2008

DISCUSSION Bruno Haible 2 participants 4 messages Jun 28, 2024 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Hi,

man/man3/getcontext.3, which describes getcontext and setcontext, says "POSIX.1-2008 removes the specification of getcontext", making it look like setcontext was still present in POSIX.1-2008.

It isn't. setcontext is removed as well. See
https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/xrat/V4_xsh_chap01.html
in the table "Removed Functions and Symbols in Issue 7".

It's just the rationale section
https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/xrat/V4_xsh_chap03.html
where getcontext is mentioned but setcontext was forgotten.

Bruno

#1 lore raw
Quoted 1 line · Bruno Haible

Hi,

Hi Bruno!

Quoted 11 lines

man/man3/getcontext.3, which describes getcontext and setcontext, says "POSIX.1-2008 removes the specification of getcontext", making it look like setcontext was still present in POSIX.1-2008.

It isn't. setcontext is removed as well. See
https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/xrat/V4_xsh_chap01.html
in the table "Removed Functions and Symbols in Issue 7".

It's just the rationale section
https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/xrat/V4_xsh_chap03.html
where getcontext is mentioned but setcontext was forgotten.

Thanks for the report!

This was fixed in

$ git describe --contains 4131356cdab8d37fc395ca5466a0401c8573380c
man-pages-6.04~26
$ git show 4131356cdab8d37fc395ca5466a0401c8573380c -- man3/getcontext.3
commit 4131356cdab8d37fc395ca5466a0401c8573380c
Author: Alejandro Colomar <[email protected]>
Date:   Fri Mar 17 17:08:01 2023 +0100

man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections

- Add a new HISTORY section that covers the history of an API, both regarding implementations and regarding old standards. This was previously covered in VERSIONS, and in some cases in STANDARDS.

- Repurpose VERSIONS to cover differing implementations in _current_ systems.

- STANDARDS is reduced to only cover current versions of standards. That basically means only C11 (C99 has been superseeded by C11; C17 is just a bugfix of C11, so not really a new version), and POSIX.1-2008 (*-2001 was superseeded by *-2008; *-2017 was just a bugfix for *-2008). The section also mentions for example 'Linux', 'GNU' or 'BSD' when a non-standard API is Linux- or GNU-only or if it's (de-facto) standard in the BSDs.

- In some cases content that should go into one of these sections was in NOTES. Move it from there to where it corresponds.

- In the SYNOPSIS, I added [[deprecated]] in some functions that I found are deprecated by the relevant standards.

- A few other related changes...

man3/getcontext.3 +4 -2
index c9561fbf4..3a35afca1 100644
@@ -157,9 +157,11 @@ .SH ATTRIBUTES
 .ad
 .sp 1
 .SH STANDARDS
+None.
+.SH HISTORY
 SUSv2, POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR getcontext (),
+.PP
+POSIX.1-2008 removes these functions,
 citing portability issues, and
 recommending that applications be rewritten to use POSIX threads instead.
 .SH NOTES
Quoted 2 lines

Bruno

Have a lovely day!
Alex

Signature · 1 line
<https://www.alejandro-colomar.es/>
#2 lore raw
Quoted 1 line · Alejandro Colomar

This was fixed in

Thanks!

I had looked at "gitk man/man3/getcontext.3", but the move and move-back of the file fooled me.

Bruno

#3 lore raw
Quoted 7 lines · Bruno Haible
Quoted 1 line · Alejandro Colomar

This was fixed in

Thanks!

I had looked at "gitk man/man3/getcontext.3", but the move and move-back of the file fooled me.

Sorry about that. :)

Quoted 6 lines

Bruno

Signature · 1 line
<https://www.alejandro-colomar.es/>