From: | Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | chris(at)bitmead(dot)com, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] psql and Control-C |
Date: | 2000-02-18 14:19:07 |
Message-ID: | Pine.GSO.4.02A.10002181516500.4777-100000@Krokodil.DoCS.UU.SE |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-02-18 14:20:22 | Re: [HACKERS] psql and Control-C |
Previous Message | Peter Eisentraut | 2000-02-18 14:16:08 | Re: [HACKERS] psql and Control-C |