delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/06/22/11:35:05

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 DOT bishop AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Socket inheritance with fork/dup2/exec
In-Reply-To: <20070622072042.GG7379@calimero.vinschen.de>
MIME-Version: 1.0
References: <200706212245 DOT l5LMjELU006807 AT chi DOT hcst DOT net> <20070622072042 DOT GG7379 AT calimero DOT vinschen DOT de>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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/

- Raw text -


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