Hi Eliot and Vincent,

(I only have phone access, so apologies for typos, formatting, etc.)

Unless I'm misunderstanding the situation, we can't easily add support
for both cygwin terminals and windows consoles.

We're compiling and linking with mingw, which means we have access to
the windows consoles directly (through ReadConsole() and
WriteConsole()). If we want to access the cygwin terminals properly we
need to use the posix io functions in cygwin1.dll (not the MS supplied
versions of the posix io functions).

I guess it would be possible to write a wrapper DLL around the posix io
functions in cygwin1.dll and load that if we recognise that we are in a
cygwin terminal. But that is obviously a fair bit of effort (not
something that I'm interested in doing in the short or medium term).

Given your acceptance of not recognising EOF correctly in a cygwin
terminal I would extend my previous suggestion that we modify Vincent's
primitiveIsFileDescriptorATTY to return an enumerated value:

0 - no console (windows only)
1 - normal terminal (unix terminal / windows console)
2 - pipe
3 - file
4 - cygwin terminal (windows only)

What do you think?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.