Re: longjump && re-entrancy



William Pursell wrote:
setjumpbuf
fprintf() <-- interrupted
[in handler]:
longjump

Could hang if printf still has a lock on the FILE *.

Or does the stack unwinding from longjump magically
release the locks?

longjmp does no "unwinding" at all. It restores the
contents of CPU registers (and state of signal blockage,
if siglongjmp) but does *nothing* else.

--
.