Mail Archives: cygwin/1998/04/19/23:20:30
> I'm porting software that uses sockets to communicate between two
> processes. Currently, the stumbling block is that under Cygwin32,
> fdopen() fails with EBADF.
You are mixing winsock calls with cygwin calls. The two are
not compatible. Winsock uses winsock handles to identify opened
sockets. Cygwin uses unix-like file descriptors. You should
use the cygwin provided socket functions (and not the winsock
version) if you wish to use file-descriptor functions like fdopen().
> Ideally, cygwin fdopen() should 'just work' like the regular Unix
> fdopen(), and I should not be fooling with _open_osfhandle. I'm
> hoping that the fdopen() patch above fixes this.
It does "just work" if you pass it a file descriptor (which is what
it's documented to require). It does not "just work" if you pass
it a Winsock handle. If they didn't both happen to be integers,
your compiler would have screamed at you :)
> Christopher Hylands, Ptolemy Project Manager University of California
> cxh AT eecs DOT berkeley DOT edu US Mail: 558 Cory Hall #1770
Tim N.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -