delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/08/18:52:41

X-Spam-Check-By: sourceware.org
Date: Thu, 8 Mar 2007 18:52:15 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: a better socketpair
Message-ID: <20070308235215.GB7745@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20070308223950 DOT GK14344 AT cantrip DOT org>
Mime-Version: 1.0
In-Reply-To: <20070308223950.GK14344@cantrip.org>
User-Agent: Mutt/1.5.11
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 Thu, Mar 08, 2007 at 02:39:50PM -0800, Nathan Myers wrote:
>Hi all,
>
>I did my first bit of coding on win32 last month, and was disgusted
>to find no socketpair.  Cygwin's socketpair (at least the version I
>found) seems to use _pipe underneath, which as I understand it is not
>suitable as an argument to select().  So, I wrote my own:
>
>  http://cantrip.org/socketpair.c
>
>which as you may observe is licensed compatibly with cygwin.
>
>Use it if you like, with whatever argument-list changes it needs to 
>conform to POSIX.  (Apparently AF_LOCAL/PF_LOCAL, normally passed to 
>socketpair, isn't defined in win32, but I presume cygwin can supply 
>that.)
>
>I'm not subscribed to this list, so copy to me anything you think
>I should see.  I would welcome notes hinting at which release of 
>cygwin this gets installed in, if any (e.g. "I put it in today") 
>and any problems encountered.

I'm sorry to say that you have made a few incorrect assumptions about
Cygwin and apparently gone to some effort to implement something which
didn't need to be implemented.

1) Cygwin has a functioning socketpair which can be used in select().
It is not implemented using _pipe and, AFAIK, has never been implemented
using _pipe since _pipe in Cygwin isn't really intended to be used
that way.

2) Pipes can be used in select() in Cygwin, anyway.

3) All of the discussion about "win32" isn't really appropriate for
cygwin.

4) See http://cygwin.com/contrib.html for a description of how to
contribute to the Cygwin code base.  I wish it was as easy as just
pointing to a web page and say "take it" but it isn't.

So, thanks for thinking of us, but this isn't anything that we can
use.
--
Christopher Faylor			spammer? ->	aaaspam AT sourceware DOT org
Cygwin Co-Project Leader				aaaspam AT duffek DOT com

--
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