cygwin application on MsTerminal, enabling win32-raw-mode results in runway memory/CPU usage.

Takashi Yano takashi.yano@nifty.ne.jp
Sat Aug 31 08:08:21 GMT 2024


On Sat, 31 Aug 2024 14:57:07 +0800
Adamyg Mob wrote:
> I raised the same question under:
> https://github.com/microsoft/terminal/issues/17824

Thanks!

> *cons_master_thread() should *possibly maintain a local key cache and not
> push back events.

This needs much modification for the cygwin console code because
the local key cache should be able to access from other process
running in the same console. This needs inter-process-communication
or shared memory.

> Alternatively, from research these pseudo key events have Vk=0/Sc=0 values
> (only char and down are set);  as such peek the console input queue and
> don't process the input stream if detected.

Another simple solution is disabling cons_master_thread in win32-input-mode.
The signalling keys such as Ctrl-C, Ctrl-Z etc. never comes anyway in that
mode.

Now I'm testing this solution.

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


More information about the Cygwin mailing list