From: | "Sean Utt" <sean(at)strateja(dot)com> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Question about Ctrl-C and less |
Date: | 2005-10-22 21:48:53 |
Message-ID: | 012401c5d752$6512fb00$0201a8c0@randomnoise |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> It won't work properly that way. SIGINT gets sent to all the members
> of the process group, not just the child. Psql isn't responsible for
> sending ctrl-c through to the child.
Except that if I am in less, and I do CONTROL-C, it doesn't do anything at
all.
It doesn't exit.
If I send a kill -2 to the process, it doesn't exit. less ignores SIGINT
completely.
So, whether or not they are working together in cooperation, the result we
have been seeing when typing CONTROL-C is completely under the control of
psql.
I do realize that the problem is one of when and how to cancel the query if
CONTROL-C is pressed.
If the query is still building and the output hasn't, or won't be, sent to
the pager, cancel the query.
If we are in the pager, don't respond to CONTROL-C, and instead output a
helpful hint telling people to use q to quit, which will do what they really
wanted anyway.
In theory, we already deal gracefully with q being pressed in the pager.
Sean
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Hallgren | 2005-10-22 22:09:35 | Re: Lifecycle management |
Previous Message | Martijn van Oosterhout | 2005-10-22 20:59:27 | Re: Query Progress Estimator |