Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
From: "Markus Hoenicka" <Markus.Hoenicka@uth.tmc.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14901.20023.668000.719983@gargle.gargle.HOWL>
Date: Mon, 11 Dec 2000 21:59:19 +0000 (CT0)
To: Corinna Vinschen <cygwin@cygwin.com>
Subject: Re: socket read()/write() problem in 1.1.6 [solved]
In-Reply-To: <00121121280303.00475@cygbert>
References: <1529f1887b.1887b1529f@uth.tmc.edu>
	<14900.63927.152000.146634@gargle.gargle.HOWL>
	<00121120152002.00475@cygbert>
	<00121121280303.00475@cygbert>
X-Mailer: VM 6.75 under Emacs 20.6.1

In any case, thanks for clarifying this issue. Much appreciated.
Markus

Corinna Vinschen writes:
 > On Monday 11 December 2000 20:15, Corinna Vinschen wrote:
 > > closesocket() behaves different dependent on the SO_LINGER option
 > > set. The default behaviour of SO_DONTLINGER which results in a
 > > immediate return while the connection is gracefully shutdown
 > > in the background.
 > >
 > > The new Cygwin socket code doesn't use standard handle duplication
 > > on socket inheritance between processes but the special Winsock2
 > > functions WSADuplicateSocket() and WSASocket().
 > >
 > > When calling closesocket() on duplicated sockets using the above
 > > Winsock2 method, closesocket() seems to act as if SO_LINGER with
 > > zero time-out is enabled which results in closesocket() returning
 > > immediately while forcing an immediate termination of the
 > > connection.
 > >
 > > That behaviour is not documented in the MSDN, AFAICS.
 > 
 > Sorry, folks. I have discovered the above description to be somewhat
 > rash. Further intensiv testing lead to the result that it's in fact
 > only a timing difference between using Winsock 1.1 and Winsock 2.0
 > sockets. You can reproduce the connection reset failure even with the
 > old implementation. It's far less frequently, though. 
 > 
 > > I tried various workarounds but the only reliable way seems to
 > > be to perform a graceful shutdown in the application.
 > 
 > At least this remains true.
 > 
 > Corinna
 > 
 > -- 
 > Corinna Vinschen                  Please, send mails regarding Cygwin to
 > Cygwin Developer                                mailto:cygwin@cygwin.com
 > Red Hat, Inc.
 > 
 > --
 > Want to unsubscribe from this list?
 > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
 > 

-- 
Markus Hoenicka, PhD
UT Houston Medical School
Dept. of Integrative Biology and Pharmacology
6431 Fannin MSB4.114
Houston, TX 77030
(713) 500-6313, -7477
(713) 500-7444 (fax)
Markus.Hoenicka@uth.tmc.edu
http://ourworld.compuserve.com/homepages/hoenicka_markus/


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

