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
Date: Wed, 7 Nov 2001 16:32:46 +0100
From: Corinna Vinschen <cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: inetd on win95
Message-ID: <20011107163246.W2965@cygbert.vinschen.de>
Mail-Followup-To: cygwin@cygwin.com
References: <GMFF7W$I4lMo9pcXo8eU30qeKiy8HkmWwKOkmIm1hbMId1s5Ia0QlJ0@voila.fr> <20011107121139.S2965@cygbert.vinschen.de> <062c01c1679a$440d9590$fa01a8c0@TJC1LAPTOP>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <062c01c1679a$440d9590$fa01a8c0@TJC1LAPTOP>; from tchick@virata.com on Wed, Nov 07, 2001 at 02:41:20PM -0000

On Wed, Nov 07, 2001 at 02:41:20PM -0000, Tim Chick wrote:
> I sent a series of mails on this topic at the start of June this year,
> with the subject:
> inetd under Win95 OSR2.5
> 
> I was using Winsock2.
> 
> I traced the problem as far as:
> A socket is duplicated as stdin. A socket operation is then performed
> on stdin, which fails with ENOTSOCK.
> 
> The following code demonstrated this:
> ns = accept(...)
> getpeername(ns, ...) -> Successful, and gets right answer
> dup2(ns,0)
> getpeername(0, ...) -> Fails with ENOTSOCK
> 
> I did not receive any other comments from the mailing list, so I presume
> the problem is still there.

So perhaps you could try to debug it further.  If you look into the
code you'll find the two ways of duplicating sockets:

Winsock1.1:	DuplicateHandle
Winsock2:	WSADuplicateSocket/WSASocket. 

We're not doing something hidden or magical.

We have already some ugly hacks in Cygwin just to workaround 95
weirdnesses.  And I _mean_ 95, not 98 or ME.  95 has serious errors
which for some reason seem to happen on some machines but not on
others.

My given suggestion to upgrade is an honest one.  98/ME is still crap
but it has some new API calls and some less bugs.  XP has an NT kernel
so it's _way_ better.

Corinna

> 
> Cheers,
> Tim
> 
> ----- Original Message ----- 
> [...]
> > Please, try this.  Hopefully it solves your problem.  If not, I can
> > only suggest upgrading to XP.  95 is actually _that_ crappy.  Even
> > upgrading to 98 would be a help.
> [...]

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

