[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Add accurate check for console stdio + add associated primitive (#254)
akgrant43
notifications at github.com
Wed May 9 19:02:27 UTC 2018
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?
Cheers,
Alistair
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/254#issuecomment-387842377
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180509/06ef1bf3/attachment-0001.html>
More information about the Vm-dev
mailing list