tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

setjmp(3) clarification



Hi,

setjmp(3) notes that the functions "save their calling
environment".

For many people perusing library function manual
pages, the term "environment" primarily brings to mind
the _process_ environment (as in "environment
variables").

I think it might be useful to nudge people's thinking
a bit more towards the actual meaning.

Does that seem reasonable?

-Jan
Index: setjmp.3
===================================================================
RCS file: /cvsroot/src/lib/libc/gen/setjmp.3,v
retrieving revision 1.18
diff -u -p -r1.18 setjmp.3
--- setjmp.3	24 May 2021 23:59:59 -0000	1.18
+++ setjmp.3	24 Oct 2026 21:55:00 -0000
@@ -33,7 +33,7 @@
 .\"
 .\"     @(#)setjmp.3	8.1 (Berkeley) 6/4/93
 .\"
-.Dd June 1, 2008
+.Dd October 24, 2026
 .Dt SETJMP 3
 .Os
 .Sh NAME
@@ -69,7 +69,9 @@ The
 .Fn setjmp ,
 and
 .Fn _setjmp
-functions save their calling environment in
+functions save their calling stack environment (a register
+set including the stack pointer, instruction pointer,
+and possibly signal mask) in
 .Fa env .
 Each of these functions returns 0.
 .Pp


Home | Main Index | Thread Index | Old Index