cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/03/06/09:58:51

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Message-ID: <3E6762CA.8EF5B6A8@ieee.org>
Date: Thu, 06 Mar 2003 10:01:30 -0500
From: "Pierre A. Humblet" <Pierre DOT Humblet AT ieee DOT org>
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: Jason Tishler <jason AT tishler DOT net>
CC: Cygwin-Developers <cygwin-developers AT cygwin DOT com>
Subject: Re: Winsock closesocket() problem
References: <20030306144658 DOT GB2008 AT tishler DOT net>

Jason Tishler wrote:
> 
> Pierre and I have been working (privately) to solve the exim problem
> that I mentioned in the following post:
> 
>     http://cygwin.com/ml/cygwin-developers/2003-02/msg00125.html
> 
> It appears that under certain conditions Winsock's closesocket() is not
> happy closing a socket more than once.  See the attached test case,
> sc9.cc, which demonstrates the problem when run under LocalSystem:
> 
>     $ sc9
>     close(fd2) failed with 108
> 
> Note that the problem follows the second close().  If I switch the order
> of the close() calls, then dup()-ed socket closes without any errors.
> Hence, I don't believe that this problem is directly related to dup().

and then closing the original socket fails. Correct?

> I have worked around the problem with the attached patch to
> fhandler_socket::close().  Is this a reasonable way to solve this
> problem?  Or, does anyone have any other suggestions?

Jason,

last time we talked you indicated that the socket was in fact not closed.
Do you know think it is closed but Windows errs in reporting an error?

Pierre

- Raw text -


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