[Expat-discuss] Exiting expat handlers

Ken Johnston klj@donnell.com
Tue Oct 29 15:17:49 2002


I was relying on a section that Sun puts at the end of each man page. It
rates the thread compatibility of each function. Sometimes they explain
the reasons, sometimes they don't. In the case of setjmp/longjmp they
are rated "Unsafe", which is the worst thread compatibility rating they
have. Since different threads have different stacks it would seem
possible to manage a multi-thread version of jumps. I suspect these
functions were just implemented on Solaris with some global variables
and never updated to a thread specific form.

- Ken Johnston

> -----Original Message-----
> From: Karl Waclawek [mailto:karl@waclawek.net]
> Sent: Tuesday, October 29, 2002 9:39 AM
> To: klj@donnell.com
> Cc: expat-discuss@libexpat.org
> Subject: Re: [Expat-discuss] Exiting expat handlers
> 
> > Thanks for the feedback. The setjmp/longjmp solution won't work for
me
> > since this application is a long running multi-threaded server and
the
> > setjmp/longjmp functions are not thread safe (at least not on
Solaris).
> > Looks like the best answer for now is to flag the error, set null
> > handlers, and keep checking for future Expat releases.
> 
> Do they need to be if a pair of corresponding setjmp/longjmp
> functions is used in the same thread?
> 
> Karl