X-Spam-Check-By: sourceware.org Message-ID: Date: Fri, 22 Jun 2007 11:34:43 -0400 From: "Lev Bishop" 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 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/