why does setjmp return 1 after longjmp(buf,0)?

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Sep 16 10:03:52 AEST 1990


In article <6511 at muffin.cme.nist.gov> libes at cme.nist.gov (Don Libes) writes:
>Was there any discussion about "fixing" this?

I don't recall any, because it not only reflected existing practice,
it also is obviously essential to prevent a longjmp from returning to
the wrong branch of the setjmp return path.

Every version of longjmp I can recall ever maintaining worked exactly
that way.



More information about the Comp.std.c mailing list