help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Re: Compiling gst with mingw32


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Re: Compiling gst with mingw32
Date: Mon, 01 Oct 2007 20:59:23 +0200
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

Akeroyd, FA (Freddie) wrote:
Hi,

I think the problem is that the change of window generates a focus
change console event; this counts as "input available" and so wakes up
the process, but as there are actually no characters to read win_recv()
in lib-src/socketx.c returns 0 which is converted into a POLLHUP by lib-src/poll.c

A nasty workaround is to edit lib-src/socketx.c and change the final
line of win_recv() to

return (nread == 0 ? 1 : nread);

This will cause the calling read() operation to block for input, which
will be OK so long as the process is not waiting on multiple input
sources.

I think it's possible to call PeekConsoleInput in win_select, in this final loop:

  /* now do a quick poll of all handles to see how many are ready */

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]