psql and Control-C

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: psql and Control-C
Date: 2000-02-17 17:05:31
Message-ID: Pine.LNX.4.21.0002171537260.3047-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Some people have indicated that they don't like how psql currently handles
Control-C if no query is in progress. I consider the behaviour of the
shells desirable but, quite frankly, I don't know how to do it.

For some reason a readline'd session always wants me to press one more key
after Control-C before getting back to a clean prompt. A much bigger
problem is that if I don't use/have readline then I don't see a way to
preempt the fgets() call.

So unless someone has a hint or wants to look at it, I could offer
ignoring the signal altogether in interactive mode, and perhaps make it
stop scripts in the other case. (Leaving the query cancelling as is, of
course.)

Actually, shouldn't a Ctrl-C in a script cancel the query *and* stop the
script at all times?

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2000-02-17 18:41:07 Re: [HACKERS] Date/time types: big changeu
Previous Message Bruce Momjian 2000-02-17 16:58:10 Re: [HACKERS] Date/time types: big changeu