Re: PATCH: Use getche on Win32

Christopher Faylor
2005-05-10T21:42:29Z

On Tue, May 10, 2005 at 05:38:21PM -0400, Christopher Faylor wrote:
>On Tue, May 10, 2005 at 04:31:28PM -0400, Daniel Jacobowitz wrote:
>>On Tue, May 10, 2005 at 11:22:17PM +0300, Eli Zaretskii wrote:
>>> > Date: Tue, 10 May 2005 13:04:52 -0700
>>> > From: Mark Mitchell <mark@codesourcery.com>
>>> > CC: bug-readline@gnu.org, gdb-patches@sources.redhat.com
>>> >
>>> > > "DTRT" in this case means raise SIGINT when Ctrl-C is pressed and go
>>> > > left one character when left-arrow is pressed.
>>> >
>>> > I take it, then, that you are asking that I implement that functionality
>>> > in readline?
>>>
>>> Well, since we are talking about Readline for GDB, and given the
>>> importance of SIGINT in GDB, I'd say at least Ctrl-C should work as
>>> expected.
>>
>>That's a whole different problem; there's no way to read characters
>>that will cause proper SIGINT delivery, since the times when GDB cares
>>about SIGINT are the times when it is not in readline. I don't know if
>>that's implementable at all (maybe Chris does?), but it won't be near
>>here.
>>
>>Does Windows offer anything like appropriate job / pgrp semantics?
>>That'd really surprise me.
>
>Windows does support CTRL-C and does have process groups. I don't know
>how close the concept of a windows process group is to UNIX, though.

Btw, there are other alternatives to using getche. You could just set
the correct mode using SetConsoleMode.

cgf