On Fri, 18 Feb 2000, Tom Lane wrote:
> However, there is some chance of screwing up libreadline --- I don't
> know enough about its innards to know if it can survive losing
> control at a random point. If we can confine the region where longjmp
> will be attempted to just the point where the program is blocked
> waiting for user input, it'd probably be pretty safe.
Readline has an official way to preempt is, namely setting rl_done to
non-zero. I can take a look how it copes with a longjmp from a signal
handler, but I wouldn't set my hopes too high.
> Something I've noticed that might or might not be related to this
> issue is that if psql exits due to backend crash, it fails to save the
> last few lines of command history into the history file. Not closing
> down libreadline, maybe?
As someone else pointed out, I might as well move write_history() into an
atexit hook.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden