[PATCH v7 1/1] Cygwin: pty: add pseudo console support.

Mark Geisert mark@maxrnd.com
Sat Aug 17 18:10:00 GMT 2019


On Sat, 17 Aug 2019, Corinna Vinschen wrote:
> Hi Takashi,
> On Aug 16 01:09, Takashi Yano wrote:
>> - Support pseudo console in PTY. Pseudo console is a new feature
>>   in Windows 10 1809, which provides console APIs on virtual
>>   terminal. With this patch, native console applications can work
>>   in PTY such as mintty, ssh, gnu screen or tmux.
>> ---
>>  winsup/cygwin/dtable.cc               |  50 ++
>>  winsup/cygwin/fhandler.h              |  42 +-
>>  winsup/cygwin/fhandler_console.cc     |  32 +
>>  winsup/cygwin/fhandler_tty.cc         | 843 +++++++++++++++++++++++++-
>>  winsup/cygwin/fork.cc                 |  24 +
>>  winsup/cygwin/select.cc               |  22 +-
>>  winsup/cygwin/spawn.cc                |  55 ++
>>  winsup/cygwin/strace.cc               |  24 +
>>  winsup/cygwin/tty.cc                  |   8 +
>>  winsup/cygwin/tty.h                   |  24 +-
>>  winsup/utils/cygwin-console-helper.cc |  14 +-
>>  11 files changed, 1093 insertions(+), 45 deletions(-)
>
> It looks like there's some timing problem in terms of stderr output.  I
> just made up the example for the Cygwin ML discussion about the mcmodel.
> When I start the code built with -mcmodel=small I expected the output:
>
> Cygwin runtime failure: /home/corinna/dll/main.exe: Invalid relocation.
> Offset 0xfffffffd80348989 at address 0x40000103b doesn't fit into 32 bits

That particular error message doesn't go out on Cygwin's stderr.  It's 
done by a Windows WriteFile() on STD_ERROR_HANDLE followed by a 
FlushFileBuffers() on same.

Not sure that it matters, but perhaps it does.

..mark



More information about the Cygwin-developers mailing list