Re: CVS HEAD psql won't let you out of a Password: prompt - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: CVS HEAD psql won't let you out of a Password: prompt
Date
Msg-id 20060926184809.GD19913@svana.org
Whole thread Raw
In response to CVS HEAD psql won't let you out of a Password: prompt  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Sep 26, 2006 at 11:58:27AM -0400, Tom Lane wrote:
> If psql wants a Password:, it won't gracefully give up in response to
> ^C, ^D, or ^J ... you *must* enter a nonempty string before you can get
> your console back.  This is pretty unfriendly, and I don't recall prior
> versions behaving that way (though I so seldom use a password with PG
> that I might be wrong).

For ^C it may have been a side-effect of the SIGINT changes, though I
doubt it. One of the first things psql does is setup a ^C handler and
it only ever did a siglongjmp in that case. But there was no setjmp
done at that point, so a ^C would have been a no-op.

psql uses simple_prompt which I beleive comes from the port directory.
And there is definitly a loop there to retry on no input. That hasn't
changed any time recently as far as I can tell.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Sane error messages for SSL retry cases
Next
From: Hannu Krosing
Date:
Subject: Re: Please to technical check of upcoming release