If you know what you are doing, threads are fine.  As you know, async signal
handling and threading don't mix well, BUT, because SIGFPE is a synchronous
signal so you are on much firmer ground: you can't block it, but since it is
synchronous you can lexically determine where it might be generated and set
thread specific data accordingly to pass any relevant contextual information
to your signal handler.  Of course, if yours is library code, not
application code, then you have to be extremely careful when setting signal
handlers -- you must be sure to chain back to any prior handler when
the signal isn't of interest to yours, and even then, multiple libraries
and the app trying to manipulate handling of any given signal is a
recipe for trouble.

One more thing: I recommend never longjmp()ing past any SQLite3 call frames
-- that strikes me as equivalent, roughly to crashes and hardware
malfunctions.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to