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'll have a think about a better fix Regards, Freddie -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cesar Rabak Sent: 30 September 2007 06:10 To: [email protected] Subject: [Help-smalltalk] Re: Compiling gst with mingw32 2007/9/29, Stephen Compall <[EMAIL PROTECTED]>: > On Sat, 2007-09-29 at 16:23 -0300, Cesar Rabak wrote: > > However, after I interact with it a little if I put the focus in any > > other Windows application, gst returns to the operating system or > > saying in other terms: the commad prompt turns back to CMD (e.g. > > C:\>). > > > > Do you have seen anything similar to this? I'm not sure nor from where > > start to debug this! > > Yes, Windows halts (but does not kill) all processes run under a command > prompt when they are out of focus. Oddly, this doesn't apply to Cygwin, > which seems to handle it correctly somehow. The place to start would be > to figure out what Windows does to stop cmd processes in this case and > fix the VM to ignore the signal (or something) on Windows. But first I > would check the Cygwin version to make sure it doesn't happen there on > your system. I'll need to wait if some other person reading this list has built a Cygwin version and has the same behaviour. > > I learned about that the hard way when trying to run a long installation > process in a background cmd window. :) I'm starting to understand why a lot of programs ported to Windows have their own "shell" while in Linux they just have a toplevel in command line... gst seems to be usable for running scripts and even works integrated with Emacs in Windows. Thanks, -- Cesar Rabak _______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk _______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk
