delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/26/10:04:10

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <003a01bea780$3721d850$02af6080@sokhapki-2.cc.bellcore.com>
From: "Sergey Okhapkin" <sos AT michigan DOT lab254 DOT telcordia DOT com>
To: "Yu-Jui Lee" <yjlee AT go-trinity DOT com DOT tw>, <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: wget blocked by Microsoft Proxy Server firewall
Date: Wed, 26 May 1999 10:01:13 -0400
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700

>function incorrect. Actually not only the proxy server is installed at
>the server computer, my PC also installed the WSP (WinSock Proxy)
>client. The WSPWSP.dll is added to \windows\system directory. Anyone


It's a bug of winsock proxy client dll - an application cannot connect
duplicated socket. Cygwin1.dll contains the following routine:

/* Cygwin internal */
static SOCKET
duplicate_socket (SOCKET sock)
{
  /* Do not duplicate socket on Windows NT because of problems with
     MS winsock proxy server.
  */
  if (os_being_run == winNT)
    return sock;

  SOCKET newsock;
  if (DuplicateHandle (GetCurrentProcess(), (HANDLE) sock,
                         GetCurrentProcess(), (HANDLE *) &newsock,
                         0, TRUE, DUPLICATE_SAME_ACCESS))
    {
      (*i_closesocket) (sock);
      sock = newsock;
    }
  else
    small_printf ("DuplicateHandle failed %E");
  return sock;
}

This routine is neccessary to run socket applications on Win95 (I don't know
if it neccessary for Win98). The problem is in socket() call on W95 - the
socket returned is non-inherittable handle (unlike NT and Unixes, where
sockets are inherittable). To fix the problem DuplicateHandle call is used
to create inherittable handle, and original handle is closed. But,
unfortunately, that raises a problem with winsock proxy dll.

Sergey Okhapkin, http://www.lexa.ru/sos
Piscataway, NJ



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019