public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Suspend doesn't work in cmd
@ 2020-05-17 17:57 Kacper Michajlow
  2020-05-18  3:05 ` Takashi Yano
  0 siblings, 1 reply; 4+ messages in thread
From: Kacper Michajlow @ 2020-05-17 17:57 UTC (permalink / raw)
  To: The Cygwin Mailing List

Hi,

Control keys doesn't seem to be working correctly under cmd.

STR:
1. Run bash in cmd.exe
2. Run anything, in my case "seq 1 100000"
3. Try to suspend job with CTRL+Z or suspend printing with CTRL+S

Ii will ignore request. Works in mintty, doesn't in cmd.

Cygwin built from e637d53

Thanks,
Kacper

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Suspend doesn't work in cmd
  2020-05-17 17:57 Suspend doesn't work in cmd Kacper Michajlow
@ 2020-05-18  3:05 ` Takashi Yano
  2020-05-19 10:54   ` Kacper Michajlow
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Yano @ 2020-05-18  3:05 UTC (permalink / raw)
  To: cygwin

On Sun, 17 May 2020 19:57:15 +0200
Kacper Michajlow via Cygwin <cygwin@cygwin.com> wrote:
> Hi,
> 
> Control keys doesn't seem to be working correctly under cmd.
> 
> STR:
> 1. Run bash in cmd.exe
> 2. Run anything, in my case "seq 1 100000"
> 3. Try to suspend job with CTRL+Z or suspend printing with CTRL+S
> 
> Ii will ignore request. Works in mintty, doesn't in cmd.

Thanks for the report. This is a known problem, however,
it is hard to fix soon.

In current console implementation, ctrl-Z is processed in
read() system call. So, if process does not call read(),
ctlr-Z does not work.

You can confirm that ctrl-Z works for cat, od, etc. which
calls read().

One solution might be to introduce a thread to handle the
keystrokes. I wonder if it is worth enough to introduce such
a big modification for console code.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Suspend doesn't work in cmd
  2020-05-18  3:05 ` Takashi Yano
@ 2020-05-19 10:54   ` Kacper Michajlow
  2020-05-19 14:15     ` Andrey Repin
  0 siblings, 1 reply; 4+ messages in thread
From: Kacper Michajlow @ 2020-05-19 10:54 UTC (permalink / raw)
  To: The Cygwin Mailing List

On Mon, 18 May 2020 at 05:06, Takashi Yano <takashi.yano@nifty.ne.jp> wrote:

> On Sun, 17 May 2020 19:57:15 +0200
> Kacper Michajlow via Cygwin <cygwin@cygwin.com> wrote:
> > Hi,
> >
> > Control keys doesn't seem to be working correctly under cmd.
> >
> > STR:
> > 1. Run bash in cmd.exe
> > 2. Run anything, in my case "seq 1 100000"
> > 3. Try to suspend job with CTRL+Z or suspend printing with CTRL+S
> >
> > Ii will ignore request. Works in mintty, doesn't in cmd.
>
> Thanks for the report. This is a known problem, however,
> it is hard to fix soon.
>
> In current console implementation, ctrl-Z is processed in
> read() system call. So, if process does not call read(),
> ctlr-Z does not work.
>
> You can confirm that ctrl-Z works for cat, od, etc. which
> calls read().
>
> One solution might be to introduce a thread to handle the
> keystrokes. I wonder if it is worth enough to introduce such
> a big modification for console code.
>

Thanks for explanation. I report those bugs, because I kind of hope to get
away from mintty and use something like Windows Terminal for all envs. But
it doesn't look feasible for Cygwin.

- Kacper

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Suspend doesn't work in cmd
  2020-05-19 10:54   ` Kacper Michajlow
@ 2020-05-19 14:15     ` Andrey Repin
  0 siblings, 0 replies; 4+ messages in thread
From: Andrey Repin @ 2020-05-19 14:15 UTC (permalink / raw)
  To: Kacper Michajlow, cygwin

Greetings, Kacper Michajlow!

> On Mon, 18 May 2020 at 05:06, Takashi Yano wrote:

>> On Sun, 17 May 2020 19:57:15 +0200
>> Kacper Michajlow wrote:
>> > Hi,
>> >
>> > Control keys doesn't seem to be working correctly under cmd.
>> >
>> > STR:
>> > 1. Run bash in cmd.exe
>> > 2. Run anything, in my case "seq 1 100000"
>> > 3. Try to suspend job with CTRL+Z or suspend printing with CTRL+S
>> >
>> > Ii will ignore request. Works in mintty, doesn't in cmd.
>>
>> Thanks for the report. This is a known problem, however,
>> it is hard to fix soon.
>>
>> In current console implementation, ctrl-Z is processed in
>> read() system call. So, if process does not call read(),
>> ctlr-Z does not work.
>>
>> You can confirm that ctrl-Z works for cat, od, etc. which
>> calls read().
>>
>> One solution might be to introduce a thread to handle the
>> keystrokes. I wonder if it is worth enough to introduce such
>> a big modification for console code.
>>

> Thanks for explanation. I report those bugs, because I kind of hope to get
> away from mintty and use something like Windows Terminal for all envs. But
> it doesn't look feasible for Cygwin.

Why not use mintty instead? :D


-- 
With best regards,
Andrey Repin
Tuesday, May 19, 2020 17:15:05

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-19 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-17 17:57 Suspend doesn't work in cmd Kacper Michajlow
2020-05-18  3:05 ` Takashi Yano
2020-05-19 10:54   ` Kacper Michajlow
2020-05-19 14:15     ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).