Pseudo console support in PTY

Takashi Yano takashi.yano@nifty.ne.jp
Sat Mar 30 13:08:00 GMT 2019


Hello cygwin developers,

I have worked on implementing pseudo console support into cygwin
PTY by request from Corinna. Pseudo console is a new feature
after Windows 10 1809, which provides console APIs on virtual
terminal.
https://blogs.msdn.microsoft.com/commandline/2018/08/02/windows-command-line-introducing-the-windows-pseudo-console-conpty/
https://docs.microsoft.com/en-us/windows/console/creating-a-pseudoconsole-session

After much effort, it began to work partially. So, I would
like to announce to this mailing list. Attached are the
patchs against cygwin git HEAD.

Patch 0001 and 0002 are not really needed by the pseudo console
support, but are the modification I have done at the same time.

Patch 0001: This just renames and unifies the function names.
  Both get_io_handle() and get_handle() were identical and
  returned io_handle. So, they were unified.

Patch 0002: This revises console code for better color handling
  and fixing select() behaviour. This provides 24 bit color
  support after Windows 10 build 14931. For legacy console,
  fake 256 color support is implemented, which use the nearest
  color from 16 system colors.

Patch 0003: Support pseudo console in PTY. With this patch,
  native console applications can work in PTY such as mintty,
  ssh, gnu screen or tmux.

Anyone who are interested in this work, please test. Any
discussions and suggestions are also welcome.

You can download the binaries from:

D=http://tyan0.dip.jp/cygwin
${D}/x86_64/test/cygwin1-20190330.dll.xz
${D}/x86_64/test/cygwin-console-helper.exe.xz
${D}/x86/test/cygwin1-20190330.dll.xz
${D}/x86/test/cygwin-console-helper.exe.xz

This cygwin1.dll requires new cygwin-console-helper.exe.
Please unxz and put them into /bin directory.

Known problems:
* Sometimes the screen layout would be broken.
* mintty fails to start if it is started in console cygwin
  session.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Cygwin-gs-et_io_handle-ranamed-to-gs-et_handle.patch
Type: application/octet-stream
Size: 28260 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20190330/de9ab7f0/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Cygwin-console-rework-implementation.patch
Type: application/octet-stream
Size: 50630 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20190330/de9ab7f0/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Cygwin-pty-support-pseudo-console.patch
Type: application/octet-stream
Size: 38103 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20190330/de9ab7f0/attachment-0002.obj>


More information about the Cygwin-developers mailing list