Re: [HACKERS] psql and Control-C - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] psql and Control-C
Date
Msg-id 287.950887429@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] psql and Control-C  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Responses Re: [HACKERS] psql and Control-C
List pgsql-hackers
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
> 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.

Oh?  Maybe we don't *need* a longjmp: maybe the signal handler just
needs to do either send-a-cancel or set-rl_done depending on the
current state of a flag that's set by the main line code.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] create database doesn't work well in MULTIBYTE mode
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Date/time types: big changeu