New implementation of pseudo console support (experimental)
Thomas Wolff
towo@towo.net
Mon Jul 27 17:10:23 GMT 2020
Hi Takashi,
Am 23.07.2020 um 19:17 schrieb Takashi Yano via Cygwin-developers:
> Hi Thomas,
>
> On Sat, 18 Jul 2020 22:57:24 +0200
> Thomas Wolff wrote:
>> Am 18.07.2020 um 07:05 schrieb Takashi Yano via Cygwin-developers:
>>> Hi Thomas,
>>>
>>> Thanks for testing.
>>>
>>> On Fri, 17 Jul 2020 16:59:56 +0200
>>> Thomas Wolff wrote:
>>>> Am 17.07.2020 um 14:47 schrieb Thomas Wolff:
>>>>> Am 17.07.2020 um 13:19 schrieb Corinna Vinschen:
>>>>>> Hi Takashi,
>>>>>>
>>>>>> On Jul 1 20:47, Takashi Yano via Cygwin-developers wrote:
>>>>>>> On Fri, 29 May 2020 00:40:24 +0900
>>>>>>> Takashi Yano via Cygwin-developers <cygwin-developers@cygwin.com>
>>>>>>> wrote:
>>>>>>>> On Tue, 26 May 2020 10:09:55 +0900
>>>>>>>> Takashi Yano via Cygwin-developers <cygwin-developers@cygwin.com>
>>>>>>>> wrote:
>>>>>>>>> On Mon, 25 May 2020 19:53:32 +0900
>>>>>>>>> Takashi Yano via Cygwin-developers <cygwin-developers@cygwin.com>
>>>>>>>>> wrote:
>>>>>>>>>> On Tue, 19 May 2020 22:40:18 +0900
>>>>>>>>>> Takashi Yano via Cygwin-developers <cygwin-developers@cygwin.com>
>>>>>>>>>> wrote:
>>>>>>>>>>> On Sat, 16 May 2020 16:47:35 +0900
>>>>>>>>>>> Takashi Yano via Cygwin-developers
>>>>>>>>>>> <cygwin-developers@cygwin.com> wrote:
>>>>>>>>>>>> On Sat, 16 May 2020 09:29:56 +0900
>>>>>>>>>>>> Takashi Yano via Cygwin-developers
>>>>>>>>>>>> <cygwin-developers@cygwin.com> wrote:
>>>>>>>>>>>>> Fix a small bug caused when stdio is redirected to another pty.
>>>>>>>>>>>> Fix another bug caused when stdio is redirected to another pty.
>>>>>>>>>>> Revise the patch to fit the current git head.
>>>>>>>>>> Revise the patch again to fit the current git head.
>>>>>>>>> Make app, which reads stdin, work under gdb.
>>>>>>>> * Prevent ResizePseudoConsole() calls unless the pty is resized.
>>>>>>>> * Revise the patch to fit the current git head.
>>>>>>> Revise the patch to fit the current git head.
>>>>>> are you satisfied with the code? If you want to merge it,
>>>>>> I'd bump Cygwin to 3.2.
>>>>> (blush) I apologize, I had promised to run my test cases.
>>>>> Beginning with it, the first succeeded, the second failed:
>>>>> run notepad (from mintty), click back into terminal, enter ^Z
>>>>> It says "Stopped" but the process is gone.
>>>>>
>>>>> Continuing may test suite soon...
>>>> OK, so here are finally my updated test results:
>>>>
>>>>
>>>> resize terminal while running Windows cmd
>>>> run cmd, resize, run dir/P:
>>>> ✓works
>>>>
>>>>
>>>> terminal reports in response to request escape sequences
>>>> ("\033[6n", "\033[0c", "\033[>c", '\033[18t', '\033]10;?\033\')
>>>> ✓works
>>>>
>>>>
>>>> output to alternate screen
>>>> echo -e "\e[?1047h"; cmd
>>>> ✓works
>>>> cmd
>>>> from other terminal: echo -e "\e[?1047h" > /dev/pty...
>>>> ↯no output; weird behaviour on ^C, mintty terminating (also in 3.1.6)
>>> I found this is a bug introduced in commit
>>> 0365031ce1347600d854a23f30f1355745a1765c.
>>>
>>> I will submit a patch for this issue.
>>>
>>>> signal handling/mediation; catch SIGTSTP
>>>> run notepad, click back into terminal, enter ^Z
>>>> ↯fails, notepad is terminated
>>>> -> this is a regression, ^Z,^C,^\ used to be ignored
>>> This behaviour is the same as cygwin 3.0.7. Pseudo console is not
>>> activated for native GUI processes.
>> OK, I understand this is consistent with my own proposal to apply pseudo
>> console only for Windows command-line programs. On the other hand, fatal
>> signal handling is another nuisance of running Windows programs from
>> cygwin, so there was a benefit.
>> Is it possible to activate the signal interworking without setting up a
>> pseudo console? If not, is it maybe worth to set it up also for Windows
>> GUI programs just for this purpose? (Modifying my proposal to trigger on
>> any Windows program.)
> When pseudo console is activated for GUI apps, ^C, ^Z and ^\ are
> just ignored. Please try additional patch attached with the latest
> pseudo console patch. Is this as you expected?
>
> I'm not sure which behaviour is better. Does anyone have opinion?
>
Just noticed this message (after travelling). Yes, killing a GUI
application on ^Z is surprising and may be fatal for the data in that
application. Ignoring ^Z, and, if that's the price, ignoring all three
is better than letting ^Z terminate an application.
That's how it is in 3.1.6; I cannot easily test the new patch as my
newlib-cygwin builds tend to bitrot. I'm always getting build failures
if I try to catch up after some weeks. This time it's
configure: error: `CCASFLAGS' was not set in the previous run
configure: error: in `/usr/src/newlib-cygwin/x86_64-pc-cygwin/newlib/libc':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm .././config.cache' and
startver
... which I can do but which takes 1-2hours on a moderately old machine...
Thomas
More information about the Cygwin-developers
mailing list