Allow psql's other uses of simple_prompt() to be interrupted by ^C.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 46d665bc26ce57b5afecbc218c8fc3c6848211d8
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-11-19T17:11:46Z
Releases: 15.0
Allow psql's other uses of simple_prompt() to be interrupted by ^C.

This fills in the work left un-done by 5f1148224.  \prompt can
be canceled out of now, and so can password prompts issued during
\connect.  (We don't need to do anything for password prompts
issued during startup, because we aren't yet trapping SIGINT
at that point.)

Nathan Bossart

Discussion: https://postgr.es/m/747443.1635536754@sss.pgh.pa.us

Files

PathChange+/−
src/bin/psql/command.c modified +35 −10
src/bin/psql/startup.c modified +2 −1
src/common/sprompt.c modified +6 −0

Discussion