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.