Re: [HACKERS] psql and Control-C

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
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 15:23:49
Message-ID: 287.950887429@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-02-18 15:35:01 Re: [HACKERS] Date/time types: big changeu
Previous Message Thomas Lockhart 2000-02-18 14:48:46 Re: [HACKERS] Date/time types: big change