Re: Question about Ctrl-C and less - Mailing list pgsql-hackers

From Sean Utt
Subject Re: Question about Ctrl-C and less
Date
Msg-id 018501c5d6a0$d761f600$0101a8c0@office.loc
Whole thread Raw
In response to Re: Question about Ctrl-C and less  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Question about Ctrl-C and less
List pgsql-hackers
If you send a recent version of vim a CONTROL-C, and you're just sitting
there at a prompt, it gives you a hint:

Type  :quit<Enter>  to exit Vim

Any reason not to just trap the CONTROL-C in psql when paging and offer a
hint? Especially since we don't really know that the user really wanted to
type CONTROL-C instead of q for quit. I know that I have always meant to
type q and was just distracted whenever I've typed CONTROL-C in the pager,
and so passing the CONTROL-C on to less is not actually "heeding my wishes",
it is instead giving me enough rope to shoot myself in the foot.

Sean

(and mixed metaphors really make by hair boil)


[big snippage]

> Not at all.  When you send SIGINT to a process, you want that process
> to stop doing whatever it's doing and return control to you.  That's
> what it means, and that's what it's for.  If we ignore SIGINT then
> obviously we will *not* be heeding the wishes of the user who sends
> SIGINT, and that is not likely what the user expects.
>
>
> -- 
> Kevin Brown       kevin@sysexperts.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>




pgsql-hackers by date:

Previous
From: Kevin Brown
Date:
Subject: Re: Question about Ctrl-C and less
Next
From: "Sean Utt"
Date:
Subject: Re: Question about Ctrl-C and less