X-Spam-Check-By: sourceware.org
Message-ID: <ba40711f0706220834oabba902necda67280dd8c3f8@mail.gmail.com>
Date: Fri, 22 Jun 2007 11:34:43 -0400
From: "Lev Bishop" <lev.bishop@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Socket inheritance with fork/dup2/exec
In-Reply-To: <20070622072042.GG7379@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <200706212245.l5LMjELU006807@chi.hcst.net> 	 <20070622072042.GG7379@calimero.vinschen.de>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 6/22/07, Corinna Vinschen wrote:

> However, the next version of Cygwin will use standard DuplicateHandle
> calls as for normal file handles.  Consequentially your
> your test application appears to work with a Cygwin built from CVS:

But MSDN says:
 You should not use DuplicateHandle to duplicate handles to the
following objects:

     * I/O completion ports. No error is returned, but the duplicate
handle cannot be used.
     * Sockets. No error is returned, but the duplicate handle may not
be recognized by
 Winsock at the target process. Also, using DuplicateHandle interferes
with internal reference  counting on the underlying object. To
duplicate a socket handle, use the
 WSADuplicateSocket function.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

