Re: longjump && re-entrancy
- From: William Pursell <bill.pursell@xxxxxxxxx>
- Date: Thu, 31 Jan 2008 11:33:57 -0800 (PST)
On Jan 30, 4:04 pm, John Reiser <jrei...@xxxxxxxxxxxx> wrote:
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.
So is it in fact unsafe to call longjmp() from a signal
handler if any signal-unsafe function may be
in the stack when the signal is received?
.
- References:
- longjump && re-entrancy
- From: William Pursell
- Re: longjump && re-entrancy
- From: John Reiser
- longjump && re-entrancy
- Prev by Date: Re: How to test packet loss rate ?
- Next by Date: Re: How many App Types R there?
- Previous by thread: Re: longjump && re-entrancy
- Next by thread: getenv, putenv
- Index(es):
Relevant Pages
|