Suspend doesn't work in cmd

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Suspend doesn't work in cmd

Cygwin list 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
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: Suspend doesn't work in cmd

Cygwin list mailing list
On Sun, 17 May 2020 19:57:15 +0200
Kacper Michajlow via Cygwin <[hidden email]> 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 <[hidden email]>
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: Suspend doesn't work in cmd

Cygwin list mailing list
On Mon, 18 May 2020 at 05:06, Takashi Yano <[hidden email]> wrote:

> On Sun, 17 May 2020 19:57:15 +0200
> Kacper Michajlow via Cygwin <[hidden email]> 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
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: Suspend doesn't work in cmd

Andrey Repin
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...

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple