[email protected] wrote:
> So far, I've been pretty diligent about making my applications
> cross-platform compatible -- in this case, these are physics calculations
> that run only under Linux (but could be made to run under Windows).
>
> Are we sure about add_fd in Windows? Windows supports _popen() which is
> the same as Linux popen();
The issue is not to do with Windows supporting popen(),
but that the Windows 'select()' call, which add_fd() uses
to 'watch' fd's in a non-blocking manner, only works on
Berkeley sockets.
Apparently, this is because Microsoft's implementation of select()
was implemented only to support the Berkeley sockets library,
ie. is part of the winsock library, and not the overall C/C++ library..
so it's not the real select() function we know and love in unix;
it's one of Microsoft's hackish implementations specific to winsock:
http://msdn.microsoft.com/en-us/library/ms740141(VS.85).aspx
And since Microsoft's popen() doesn't use sockets (it probably uses
pipes.. but who knows for sure), add_fd() can't work with popen().
So under Windows, fd's passed to select() are limited to sockets.
Pretty sure about the above.
I know my simple example app for popen() that tried to use it
would still block. The code will compile, it just won't work
as expected.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk