Hi Vincent & Eliot,

What do you mean by broken? Do you have an example I can reproduce?

Sure - if you start PharoConsole.exe from within a cygwin (mintty)
terminal and remove the #isWin32 block from Stdio
class>>standardIOStreamNamed:forWrite: so that you are actually using
stdout, and then attempt to write something to stdout you'll get a
primitive failure. The same sequence works from a dos box (cmd.exe).

That's because the read and write primitives rely on the Windows
ReadConsole() and WriteConsole() functions, which only work in a dos
box, not in mintty.

When we started these modifications I assumed that it would be possible
to have I/O that worked in both cygwin (mintty) and a dos box (cmd.exe).
However on further reading it looks like MingW programs (which use
either Windows functions such as ReadConsole() and WriteConsole() or
the MS posix implementation) will only work properly in a dos box. If
you want proper mintty support you need to use the cygwin implementation
of the posix functions.

As an example, attempting to use the MingW/MS fread() function and
signal EOF:

Someone please explain how I am wrong and how to get stdio working on
both dos boxes and cygwin terminals...

Thanks,
Alistair


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