longjump && re-entrancy
- From: William Pursell <bill.pursell@xxxxxxxxx>
- Date: Tue, 29 Jan 2008 23:11:25 -0800 (PST)
I understand (which is to say I believe it is the case)
that it is safe to call longjump() from a signal handler.
I also understand that non-reentrant functions are unsafe
to call from a signal handler. But it seems to me that
if the program ever calls a non-rentrant function and
longjumps out of a signal handler, then all the issues of
non-reentrancy apply. eg:
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?
.
- Follow-Ups:
- Re: longjump && re-entrancy
- From: John Reiser
- Re: longjump && re-entrancy
- Prev by Date: overriding effect of -Bsymbolic, can TLSkey be useful?
- Next by Date: getenv, putenv
- Previous by thread: overriding effect of -Bsymbolic, can TLSkey be useful?
- Next by thread: Re: longjump && re-entrancy
- Index(es):
Relevant Pages
|