Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: JRSON AT NetZero DOT Net (John R Hanson) To: cygwin AT sourceware DOT cygnus DOT com Subject: Re: fdopen() and winsock Date: Mon, 23 Aug 1999 07:28:47 GMT Reply-To: JRSON AT NetZero DOT Net Message-ID: <37c0f58b.2428339@smtp.netzero.net> References: <19990822155318 DOT 48750 DOT qmail AT hotmail DOT com> In-Reply-To: <19990822155318.48750.qmail@hotmail.com> X-Mailer: Forte Agent 1.5/32.452 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Note-from-DJ: This may be spam Actually They are regular file handles, just like any other. There is a bug in all 9x/kernel32 libc/msv/crtdll interface implementations GetFileType() returns TYPE_UNKNOWN for handles to sockets. Since this is AFAIK the only unknown type there is, you know you have a socket handle;-) there is a fix in the more recent perl distrib's that you can use as a general solution. -loldnames -lperlcrt -lmsvcrt will get you TYPE_CHAR for socket handles. that are put into an fd with _open_osfhandle() also fixes several other nasty bugs in the MS libcXXX. On Sun, 22 Aug 1999 17:53:18 CEST, you wrote: >>Ah, as far as I know, one of the big limitations of winsock is that >>the SOCKET type is *not* equivalent to file descriptor unlike that >>using BSD or POSIX sockets. That's one of the major reasons for using >>a separate data type, SOCKET, as opposed to int, typical type of a >>file descriptor. This implies that you cannot mix SOCKETs and stdio, >>sorry. This is the case when you use -mno-cygwin. > >socket handles are NOT file handles only under win9x. Under WNT they ARE >file handles. > > >______________________________________________________ >Get Your Private, Free Email at http://www.hotmail.com ________________________________________________________ NetZero - We believe in a FREE Internet. Shouldn't you? Get your FREE Internet Access and Email at http://www.netzero.net/download/index.html -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com