tech-userlevel archive

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

Re: setjmp(3) clarification



On Sat, Oct 24, 2026 at 19:25:16 -0400, Jan Schaumann wrote:

> 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?

I see where you are coming from, but I don't really like this change.
It doesn't help too much someone who doens't know about jmp functions
and this is probably not the right place to give them a tutorial.  And
the next paragraph says more or less the same thing when it says "as
if..."

Our current text ("calling environment") is aligned with posix, I
think.  "Calling _stack_ environment" is also misleading as jmpbuf
saves register contents, so it's kinda true, and it kinda isn't and
that just rubs me the wrong way...

-uwe


Home | Main Index | Thread Index | Old Index